Skip to content

Commit

Permalink
Merge pull request #16 from octodns/isort
Browse files Browse the repository at this point in the history
Use pyproject.toml for tooling, add isort management of imports #975
  • Loading branch information
ross committed Feb 4, 2023
2 parents 5c2be3e + 7cc9aab commit 343ef7c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.black]
line-length=80
skip-string-normalization=true
skip-magic-trailing-comma=true

[tool.isort]
profile = "black"
known_first_party="{MODULE}"
known_octodns="octodns"
line_length=80
sections="FUTURE,STDLIB,THIRDPARTY,OCTODNS,FIRSTPARTY,LOCALFOLDER"

[tool.pytest.ini_options]
pythonpath = "."
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,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
Expand Down
2 changes: 0 additions & 2 deletions script/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ grep -r -I --line-number "# pragma: +no.*cover" $SOURCE_DIR && {
# TODO: ensure any common env var secrets have been cleared
export TODO_ACCESS_KEY_ID=

export PYTHONPATH=.:$PYTHONPATH

pytest \
--disable-network \
--cov-reset \
Expand Down
3 changes: 2 additions & 1 deletion script/format
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions script/test
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ fi
# TODO: ensure any common env var secrets have been cleared
export TODO_ACCESS_KEY_ID=

export PYTHONPATH=.:$PYTHONPATH

pytest --disable-network "$@"
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from os import environ
from setuptools import find_packages, setup
from subprocess import CalledProcessError, check_output

from setuptools import find_packages, setup


def descriptions():
with open('README.md') as fh:
Expand Down Expand Up @@ -48,6 +49,7 @@ def version():
+ (
'black>=22.3.0',
'build>=0.7.0',
'isort>=5.11.4',
'pyflakes>=2.2.0',
'readme_renderer[md]>=26.0',
'twine>=3.4.2',
Expand Down

0 comments on commit 343ef7c

Please sign in to comment.