Add flake8 to CI, too

This commit is contained in:
Łukasz Langa 2018-03-16 00:42:15 -07:00
parent 1ec7544ab7
commit 0de0851a47
3 changed files with 4 additions and 3 deletions

View File

@ -4,5 +4,5 @@
[flake8]
ignore = E266, E501
max-line-length = 80
max-complexity = 12
max-complexity = 15
select = B,C,E,F,W,T4,B9

View File

@ -2,11 +2,12 @@ sudo: false
language: python
cache: pip
before_script:
- pip install mypy
- pip install flake8 flake8-bugbear mypy
- pip install -e .
script:
- python setup.py test
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then mypy black.py tests/test_black.py; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6-dev' ]]; then flake8 black.py tests/test_black.py; fi
notifications:
on_success: change
on_failure: always

View File

@ -807,7 +807,7 @@ def __attrs_post_init__(self) -> None:
ALWAYS_NO_SPACE = CLOSING_BRACKETS | {token.COMMA, token.COLON, STANDALONE_COMMENT}
def whitespace(leaf: Leaf) -> str:
def whitespace(leaf: Leaf) -> str: # noqa C901
"""Return whitespace prefix if needed for the given `leaf`."""
NO = ''
SPACE = ' '