Browse Source

use pyproject.toml for tooling, add isort

pull/975/head
Ross McFarland 3 years ago
parent
commit
cfaf7315de
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
7 changed files with 18 additions and 5 deletions
  1. +2
    -0
      .git-blame-ignore-revs
  2. +12
    -0
      pyproject.toml
  3. +1
    -0
      requirements-dev.txt
  4. +0
    -2
      script/coverage
  5. +2
    -1
      script/format
  6. +0
    -2
      script/test
  7. +1
    -0
      setup.py

+ 2
- 0
.git-blame-ignore-revs View File

@ -2,3 +2,5 @@
e116d26eeca0891c31b689e43db5bb60b62f73f6
# Commit that fixed a bunch of uneeded '...' '...' string joins from ^
fa4225b625654c51c7b0be6efcfd6a1109768a72
# Commit that added in isort formatting support
6be0a8133a4fd9e12e6ac3affbdd69555b6c2503

+ 12
- 0
pyproject.toml View File

@ -0,0 +1,12 @@
[tool.black]
line-length=80
skip-string-normalization=true
skip-magic-trailing-comma=true
[tool.isort]
profile = "black"
known_first_party="octodns"
line_length=80
[tool.pytest.ini_options]
pythonpath = "."

+ 1
- 0
requirements-dev.txt View File

@ -14,6 +14,7 @@ docutils==0.19
exceptiongroup==1.0.0
importlib-metadata==5.0.0
iniconfig==1.1.1
isort==5.11.4
jaraco.classes==3.2.3
keyring==23.9.3
more-itertools==9.0.0


+ 0
- 2
script/coverage View File

@ -38,8 +38,6 @@ grep -r -I --line-number "# pragma: +no.*cover" $SOURCE_DIR && {
exit 1
}
export PYTHONPATH=.:$PYTHONPATH
pytest \
--disable-network \
--cov-reset \


+ 2
- 1
script/format View File

@ -6,4 +6,5 @@ SOURCES=$(find *.py octodns tests -name "*.py")
. env/bin/activate
black --line-length=80 --skip-string-normalization --skip-magic-trailing-comma "$@" $SOURCES
isort "$@" $SOURCES
black "$@" $SOURCES

+ 0
- 2
script/test View File

@ -30,6 +30,4 @@ export ARM_CLIENT_SECRET=
export ARM_TENANT_ID=
export ARM_SUBSCRIPTION_ID=
export PYTHONPATH=.:$PYTHONPATH
pytest --disable-network "$@"

+ 1
- 0
setup.py View File

@ -74,6 +74,7 @@ setup(
+ (
'black>=22.3.0',
'build>=0.7.0',
'isort>=5.11.4',
'pycountry>=19.8.18',
'pycountry-convert>=0.7.2',
'pyflakes>=2.2.0',


Loading…
Cancel
Save