diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..4f6e9562b --- /dev/null +++ b/.flake8 @@ -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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9410d6a8b..9ffd60a87 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 diff --git a/requirements.txt b/requirements.txt index a505dded1..567872472 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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