From 400c9eecb64842b9389c928a32682a77cd4fd34a Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sat, 9 Mar 2019 01:20:42 +0100 Subject: [PATCH] Re-add flake8 to CI --- .flake8 | 16 ++++++++++++++++ azure-pipelines.yml | 6 ++++-- requirements.txt | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .flake8 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