Skip to content

Commit

Permalink
Added isort to setup, makefile and tox
Browse files Browse the repository at this point in the history
  • Loading branch information
prathmeshranaut committed Apr 23, 2023
1 parent fb4bb48 commit 91ed2d0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ common: &common
- cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- run:
name: install dependencies
command: pip install --user tox
command: |
python -m pip install --upgrade pip
python -m pip install tox --upgrade
- run:
name: run tox
command: python -m tox -r
Expand Down
15 changes: 15 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[settings]
profile=black
force_grid_wrap=1
multi_line_output=3
honor_noqa=true
float_to_top=true
combine_as_imports=true
force_sort_within_sections=true
include_trailing_comma=true
extra_standard_library=pytest
known_first_party=eth
line_length=88
use_parentheses=true
# skip `__init__.py` files because sometimes order of initialization is important
skip=__init__.py
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ clean-pyc:
find . -name '__pycache__' -exec rm -rf {} +

lint:
tox -e lint
tox run -e lint

lint-roll:
isort eth
$(MAKE) lint

test:
py.test --tb native tests
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"pydocstyle>=6.0.0",
"types-setuptools",
"importlib-metadata<5.0;python_version<'3.8'",
"isort==5.11.4"
],
'benchmark': [
"termcolor>=1.1.0,<2.0.0",
Expand All @@ -72,7 +73,7 @@
"idna==2.7",
# idna 2.7 is not supported by requests 2.18
"requests>=2.20,<3",
"tox==2.7.0",
"tox>=4.0.0",
"twine",
],
}
Expand Down

0 comments on commit 91ed2d0

Please sign in to comment.