Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kindlycat/dev
Update supported versions Add black
- Loading branch information
Showing
18 changed files
with
100 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
.PHONY: clean, build | ||
.PHONY: help, clean, build, docs | ||
|
||
help: | ||
@cat $(MAKEFILE_LIST) | ||
|
||
clean: | ||
rm -rf build dist *.egg-info | ||
|
||
build: | ||
python setup.py sdist | ||
python setup.py bdist_wheel | ||
|
||
docs: | ||
make -C ./docs html | ||
|
||
linters: | ||
flake8 . | ||
black . --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[tool.black] | ||
line-length = 79 | ||
include = '\.pyi?$' | ||
skip-string-normalization = true | ||
exclude = ''' | ||
( | ||
migrations | ||
| \.\* | ||
| .venv | ||
| docs | ||
) | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
django-jinja | ||
sphinx | ||
sphinx_rtd_theme | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
[bdist_wheel] | ||
universal=1 | ||
universal = 1 | ||
|
||
[isort] | ||
multi_line_output=5 | ||
lines_after_imports=2 | ||
line_length = 79 | ||
multi_line_output = 3 | ||
lines_after_imports = 2 | ||
not_skip = __init__.py | ||
skip=migrations,docs,build,.git,.tox,__pycache__ | ||
skip = migrations,docs,build,.git,.tox,__pycache__ | ||
known_django = django | ||
default_section=FIRSTPARTY | ||
known_third_party = request_vars | ||
default_section = FIRSTPARTY | ||
sections = FUTURE,STDLIB,THIRDPARTY,DJANGO,FIRSTPARTY,LOCALFOLDER | ||
include_trailing_comma = True | ||
|
||
[flake8] | ||
exclude=.git,.tox,__pycache__,build,docs,migrations | ||
max-line-length = 79 | ||
max-complexity = 12 | ||
inline-quotes = ' | ||
ignore = A003,W503 | ||
exclude = .git,.tox,__pycache__,build,docs,migrations | ||
[coverage:run] | ||
omit = */management/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
from django.conf.urls import url | ||
|
||
from tests.test_app.views import ( | ||
request_cache_view, test_template_tag_view, test_view | ||
request_cache_view, | ||
test_template_tag_view, | ||
test_view, | ||
) | ||
|
||
|
||
urlpatterns = [ | ||
url(r'^test_view/$', test_view), | ||
url(r'^request_cache_view/$', request_cache_view), | ||
url(r'^test_django_template_tag/$', test_template_tag_view), | ||
url(r'^test_jinja_template_tag/$', test_template_tag_view, | ||
kwargs={'template': 'index.jinja'}) | ||
url( | ||
r'^test_jinja_template_tag/$', | ||
test_template_tag_view, | ||
kwargs={'template': 'index.jinja'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,34 @@ | ||
[tox] | ||
skip_missing_interpreters = True | ||
envlist = | ||
py{27,35,36,37}-dj{111} | ||
py{35,36,37,38}-{dj22} | ||
py{36,37,38}-{dj30,djmaster} | ||
flake | ||
|
||
[testenv] | ||
basepython = | ||
py27: python2.7 | ||
py35: python3.5 | ||
py36: python3.6 | ||
py37: python3.7 | ||
py38: python3.8 | ||
deps = | ||
dj111: Django>=1.11,<2.0 | ||
dj22: Django>=2.2,<2.3 | ||
dj30: Django>=3.0,<3.1 | ||
djmaster: https://github.com/django/django/archive/master.tar.gz | ||
coverage | ||
-r requirements.txt | ||
commands = coverage run --source=request_vars ./runtests.py {posargs} | ||
|
||
[testenv:flake] | ||
[testenv:linters] | ||
basepython = python3 | ||
deps = flake8-isort | ||
commands = flake8 | ||
deps = | ||
flake8-isort | ||
black | ||
commands = make linters | ||
skip_install = True | ||
|
||
[travis:env] | ||
DJANGO = | ||
1.11: dj111 | ||
2.0: dj20 | ||
2.1: dj21 | ||
2.2: dj22 | ||
3.0: dj30 | ||
master: djmaster |