Re-add flake8 to CI

This commit is contained in:
Ines Montani 2019-03-09 01:20:42 +01:00
parent 3d08bf9514
commit 400c9eecb6
3 changed files with 21 additions and 2 deletions

16
.flake8 Normal file
View File

@ -0,0 +1,16 @@
15 lines (14 sloc) 290 Bytes
[flake8]
ignore = E203, E266, E501, E731, W503
max-line-length = 80
select = B,C,E,F,W,T4,B9
exclude =
.env,
.git,
__pycache__,
lemmatizer.py,
lookup.py,
_tokenizer_exceptions_list.py,
spacy/lang/fr/lemmatizer,
spacy/lang/nb/lemmatizer
spacy/__init__.py

View File

@ -54,13 +54,15 @@ jobs:
versionSpec: '$(python.version)'
architecture: 'x64'
# Downgrading pip is necessary to prevent a wheel version incompatiblity.
# Might be fixed in the future or some other way, so investigate again.
- script: |
python -m pip install --upgrade pip==18.1
pip install -r requirements.txt
displayName: 'Install dependencies'
# - script: python -m flake8 . --count --exclude=spacy/compat.py,spacy/lang --select=E901,E999,F821,F822,F823 --show-source --statistics
# displayName: 'flake8'
- script: python -m flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
displayName: 'flake8'
- script: |
python setup.py build_ext --inplace

View File

@ -12,3 +12,4 @@ requests>=2.13.0,<3.0.0
pytest>=4.0.0,<4.1.0
mock>=2.0.0,<3.0.0
pathlib==1.0.1; python_version < "3.4"
flake8>=3.5.0,<3.6.0