Add flake8 to CI, too
This commit is contained in:
parent
1ec7544ab7
commit
0de0851a47
2
.flake8
2
.flake8
@ -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
|
||||
|
@ -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
|
||||
|
2
black.py
2
black.py
@ -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 = ' '
|
||||
|
Loading…
Reference in New Issue
Block a user