Skip to content

Commit

Permalink
Adding isort
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Feb 16, 2017
1 parent 3ecfadf commit 4276b47
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .isort.cfg
@@ -0,0 +1,13 @@
[settings]
indent=4
combine_star=1
combine_as_imports=1
include_trailing_comma=1
multi_line_output=3
lines_after_imports=2
known_django=django
known_future_library=future
known_standard_library=types,requests
known_first_party=allauth
default_section=THIRDPARTY
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -21,6 +21,7 @@ install:
- pip install "$DJANGO" "coverage==3.7.1" coveralls "mock>=1.0.1"
- pip install .
- pip install flake8
- pip install isort
matrix:
exclude:
- python: "3.5"
Expand All @@ -38,7 +39,7 @@ branches:
only:
- master
script:
- flake8 --exclude=migrations allauth
- make qa
- coverage run manage.py test allauth
after_success:
- coverage report
Expand Down
24 changes: 20 additions & 4 deletions Makefile
@@ -1,5 +1,6 @@
VIRTUALENV = $(shell pwd)/venv.tmp
PYTHON = $(VIRTUALENV)/bin/python
ISORT = isort $$(find $(PWD)/allauth -not -path '*/migrations/*' -type f -name '*.py' -not -name '__init__.py' -print)

po:
( cd allauth ; $(PYTHON) ../manage.py makemessages -a -e html,txt,py )
Expand All @@ -10,7 +11,22 @@ mo:
docs:
( . $(VIRTUALENV)/bin/activate; cd docs; make html )

.PHONY: \
po \
mo \
docs
isort-check:
$(ISORT) -c

isort-fix:
$(ISORT)

pep8:
flake8 --exclude=migrations allauth

qa: isort-check pep8

.PHONY: \
po \
mo \
docs \
isort-fix \
isort-check \
pep8 \
qa

0 comments on commit 4276b47

Please sign in to comment.