From c6effd4dde5082ea08b62a7dec7f61536c9d74e4 Mon Sep 17 00:00:00 2001 From: Alexey Stepanov Date: Mon, 18 Feb 2019 11:59:45 +0100 Subject: [PATCH] typing was never updated for py37 (#131) * typing was never updated for py37 Extend CI --- .azure_pipelines/run_tests.yml | 1 + .travis.yml | 2 +- azure-pipelines.yml | 45 +++++++++++++++++++++++++++------- requirements.txt | 2 +- tox.ini | 12 +++++++-- 5 files changed, 49 insertions(+), 13 deletions(-) diff --git a/.azure_pipelines/run_tests.yml b/.azure_pipelines/run_tests.yml index 38ee658..f1d343f 100644 --- a/.azure_pipelines/run_tests.yml +++ b/.azure_pipelines/run_tests.yml @@ -9,6 +9,7 @@ jobs: dependsOn: - PyLint - MyPy + - PEP8 pool: vmImage: "vs2017-win2016" diff --git a/.travis.yml b/.travis.yml index 955a8fb..4d778bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,7 +74,7 @@ jobs: install: - *upgrade_python_toolset - *install_deps - - pip install --upgrade "mypy >= 0.660" + - pip install --upgrade "mypy >= 0.670" script: - mypy --strict exec_helpers - <<: *static_analysis diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3be4884..22b5ae9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,7 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python jobs: -- job: 'PyLint' +- job: 'PEP8' pool: vmIMage: 'VS2017-Win2016' steps: @@ -16,20 +16,47 @@ jobs: python -m pip install --upgrade pip pip install -U setuptools pip install -r requirements.txt + pip install -U pytest pylint pytest-sugar pytest-flake8 flake8-bugbear flake8-docstrings displayName: 'Install dependencies' - script: | + pytest -vvv --flake8 -m flake8 --junitxml=flake8_result.xml exec_helpers + displayName: 'PEP8' + + - task: PublishTestResults@2 + displayName: publish test results via junit + condition: succeededOrFailed() + inputs: + testResultsFormat: "JUnit" + testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/flake8_result.xml') }} + testRunTitle: 'PEP8' + +- job: 'PyLint' + pool: + vmIMage: 'VS2017-Win2016' + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + + - script: | + python -m pip install --upgrade pip + pip install -U setuptools + pip install -r requirements.txt pip install -U pytest pylint pytest-pylint pytest-sugar + displayName: 'Install dependencies' + + - script: | pytest -vvv --pylint -m pylint --junitxml=pylint_result.xml exec_helpers displayName: 'PyLint' -# - task: PublishTestResults@2 -# displayName: publish test results via junit -# condition: succeededOrFailed() -# inputs: -# testResultsFormat: "PyLint" -# testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }} -# testRunTitle: 'MyPy' + - task: PublishTestResults@2 + displayName: publish test results via junit + condition: succeededOrFailed() + inputs: + testResultsFormat: "JUnit" + testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }} + testRunTitle: 'PyLint' - job: 'MyPy' pool: @@ -43,10 +70,10 @@ jobs: python -m pip install --upgrade pip pip install -U setuptools pip install -r requirements.txt + pip install -U mypy displayName: 'Install dependencies' - script: | - pip install -U mypy mypy --strict --junit-xml=mypy_result.xml exec_helpers displayName: 'MyPy' diff --git a/requirements.txt b/requirements.txt index 164f316..02183da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,5 @@ six>=1.10.0 # MIT threaded>=2.0 # Apache-2.0 PyYAML>=3.12 # MIT advanced-descriptors>=1.0 # Apache-2.0 -typing >= 3.6 ; python_version < "3.8" +typing >= 3.6 ; python_version < "3.7" psutil >= 5.0 diff --git a/tox.ini b/tox.ini index 7ef8152..140f3ea 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ deps = pytest-cov pytest-html pytest-sugar - py{34,35,36,37}-nocov: Cython + py{36,37}-nocov: Cython -r{toxinidir}/CI_REQUIREMENTS.txt commands = @@ -89,8 +89,16 @@ exclude = ignore = E203, W503 + D401, + D202, + D203, + D213 # whitespace before ':' # line break before binary operator +# First line should be in imperative mood; try rephrasing +# No blank lines allowed after function docstring +# 1 blank line required before class docstring +# Multi-line docstring summary should start at the second line show-pep8 = True show-source = True count = True @@ -131,7 +139,7 @@ commands = pipdeptree [testenv:mypy] deps = - mypy>=0.660 + mypy>=0.670 lxml -r{toxinidir}/CI_REQUIREMENTS.txt commands = mypy --strict --xslt-html-report mypy_report -p exec_helpers