configure black and update flake8
2 files added
4 files modified
New file |
| | |
| | | [flake8] |
| | | ignore = |
| | | # E203: whitespace before ':' (black fails to be PEP8 compliant) |
| | | E203 |
| | | # E731: do not assign a lambda expression, use a def |
| | | E731 |
| | | # W503: line break before binary operator (flake8 is not PEP8 compliant) |
| | | W503 |
| | | exclude = |
| | | src/pyramid/compat.py |
| | | src/pyramid/scaffolds/alchemy |
| | | src/pyramid/scaffolds/starter |
| | | src/pyramid/scaffolds/zodb |
| | | tests/fixtures |
| | | tests/pkgs |
| | | tests/test_config/pkgs |
| | | tests/test_config/path |
| | | show-source = True |
| | |
| | | env: TOXENV=pypy |
| | | - python: pypy3 |
| | | env: TOXENV=pypy3 |
| | | - python: 3.5 |
| | | - python: 3.6 |
| | | env: TOXENV=py2-cover,py3-cover,coverage |
| | | - python: 3.5 |
| | | env: TOXENV=docs |
| | | - python: 3.5 |
| | | - python: 3.6 |
| | | env: TOXENV=lint |
| | | - python: 3.7 |
| | | env: TOXENV=py37 |
| | |
| | | include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt |
| | | |
| | | include contributing.md RELEASING.txt |
| | | include .coveragerc tox.ini appveyor.yml .travis.yml rtd.txt |
| | | include .coveragerc .flake8 setup.cfg pyproject.toml |
| | | include tox.ini appveyor.yml .travis.yml rtd.txt |
| | | graft .github |
| | | |
| | | include HACKING.txt hacking-tox.ini |
New file |
| | |
| | | [build-system] |
| | | requires = ["setuptools", "wheel"] |
| | | |
| | | [tool.black] |
| | | line-length = 79 |
| | | skip-string-normalization = true |
| | | py36 = false |
| | | exclude = ''' |
| | | /( |
| | | \.git |
| | | | \.mypy_cache |
| | | | \.tox |
| | | | \.venv |
| | | | \.pytest_cache |
| | | | dist |
| | | | build |
| | | | docs |
| | | | src/pyramid/scaffolds/alchemy |
| | | | src/pyramid/scaffolds/starter |
| | | | src/pyramid/scaffolds/zodb |
| | | )/ |
| | | ''' |
| | | |
| | | # This next section only exists for people that have their editors |
| | | # automatically call isort, black already sorts entries on its own when run. |
| | | [tool.isort] |
| | | multi_line_output = 3 |
| | | include_trailing_comma = true |
| | | force_grid_wrap = 0 |
| | | combine_as_imports = true |
| | | line_length = 79 |
| | |
| | | [metadata] |
| | | license_file = LICENSE.txt |
| | | |
| | | [flake8] |
| | | ignore = |
| | | # E121: continuation line under-indented for hanging indent |
| | | E121, |
| | | # E123: closing bracket does not match indentation of opening bracket's line |
| | | E123, |
| | | # E125: continuation line with same indent as next logical line |
| | | E125, |
| | | # E127: continuation line over-indented for visual indent |
| | | E127, |
| | | # E128: continuation line under-indented for visual indent |
| | | E128, |
| | | # E129: visually indented line with same indent as next logical line |
| | | E129, |
| | | # E201: whitespace after '(' |
| | | E201, |
| | | # E202: whitespace before ')' |
| | | E202, |
| | | # E231: missing whitespace after ',', ';', or ':' |
| | | E231, |
| | | # E261: at least two spaces before inline comment |
| | | E261, |
| | | # E262: inline comment should start with '# ' |
| | | E262, |
| | | # E265: block comment should start with '# ' |
| | | E265, |
| | | # E266: too many leading '#' for block comment |
| | | E266, |
| | | # E301: expected 1 blank line, found 0 |
| | | E301, |
| | | # E302: expected 2 blank lines, found 0 |
| | | E302, |
| | | # E303: too many blank lines (3) |
| | | E303, |
| | | # E305: expected 2 blank lines after class or function definition, found 1 |
| | | E305, |
| | | # E306: expected 1 blank line before a nested definition, found 0 |
| | | E306, |
| | | # E501: line too long (82 > 79 characters) |
| | | E501, |
| | | # E731: do not assign a lambda expression, use a def |
| | | E731, |
| | | # W291: trailing whitespace |
| | | W291, |
| | | # W293: blank line contains whitespace |
| | | W293, |
| | | # W391: blank line at end of file |
| | | W391, |
| | | # W503: line break before binary operator |
| | | W503 |
| | | exclude = pyramid/tests/,pyramid/compat.py,pyramid/resource.py |
| | | show-source = True |
| | | |
| | | [check-manifest] |
| | | ignore = |
| | | .gitignore |
| | |
| | | pypy: pypy |
| | | pypy3: pypy3 |
| | | py2: python2.7 |
| | | py3: python3.5 |
| | | py3: python3.6 |
| | | |
| | | commands = |
| | | nosetests --with-xunit --xunit-file=nosetests-{envname}.xml {posargs:} |
| | |
| | | |
| | | [testenv:lint] |
| | | skip_install = true |
| | | basepython = python3.5 |
| | | basepython = python3.6 |
| | | commands = |
| | | flake8 pyramid/ |
| | | flake8 src/pyramid tests setup.py |
| | | black --check --diff src/pyramid tests setup.py |
| | | python setup.py check -r -s -m |
| | | check-manifest |
| | | deps = |
| | | flake8 |
| | | black |
| | | readme_renderer |
| | | check-manifest |
| | | |
| | |
| | | |
| | | [testenv:coverage] |
| | | skip_install = true |
| | | basepython = python3.5 |
| | | basepython = python3.6 |
| | | commands = |
| | | coverage erase |
| | | coverage combine |
| | |
| | | setenv = |
| | | COVERAGE_FILE=.coverage |
| | | |
| | | [testenv:black] |
| | | skip_install = true |
| | | basepython = python3.6 |
| | | commands = |
| | | black src/pyramid tests setup.py |
| | | deps = |
| | | black |
| | | |
| | | [testenv:build] |
| | | skip_install = true |
| | | basepython = python3.6 |