Skip to content

Commit 234ab52

Browse files
committed
typing was never updated for py37 (#131)
Extend CI (cherry picked from commit c6effd4) Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent 1f5e8c5 commit 234ab52

File tree

5 files changed

+49
-13
lines changed

5 files changed

+49
-13
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
dependsOn:
1010
- PyLint
1111
- MyPy
12+
- PEP8
1213
pool:
1314
vmImage: "vs2017-win2016"
1415

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
install:
8181
- *upgrade_python_toolset
8282
- *install_deps
83-
- pip install --upgrade "mypy >= 0.660"
83+
- pip install --upgrade "mypy >= 0.670"
8484
script:
8585
- mypy --strict exec_helpers
8686
- <<: *static_analysis

azure-pipelines.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
55

66
jobs:
7-
- job: 'PyLint'
7+
- job: 'PEP8'
88
pool:
99
vmIMage: 'VS2017-Win2016'
1010
steps:
@@ -16,20 +16,47 @@ jobs:
1616
python -m pip install --upgrade pip
1717
pip install -U setuptools
1818
pip install -r requirements.txt
19+
pip install -U pytest pylint pytest-sugar pytest-flake8 flake8-bugbear flake8-docstrings
1920
displayName: 'Install dependencies'
2021
2122
- script: |
23+
pytest -vvv --flake8 -m flake8 --junitxml=flake8_result.xml exec_helpers
24+
displayName: 'PEP8'
25+
26+
- task: PublishTestResults@2
27+
displayName: publish test results via junit
28+
condition: succeededOrFailed()
29+
inputs:
30+
testResultsFormat: "JUnit"
31+
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/flake8_result.xml') }}
32+
testRunTitle: 'PEP8'
33+
34+
- job: 'PyLint'
35+
pool:
36+
vmIMage: 'VS2017-Win2016'
37+
steps:
38+
- task: UsePythonVersion@0
39+
inputs:
40+
versionSpec: '3.7'
41+
42+
- script: |
43+
python -m pip install --upgrade pip
44+
pip install -U setuptools
45+
pip install -r requirements.txt
2246
pip install -U pytest pylint pytest-pylint pytest-sugar
47+
displayName: 'Install dependencies'
48+
49+
- script: |
2350
pytest -vvv --pylint -m pylint --junitxml=pylint_result.xml exec_helpers
2451
displayName: 'PyLint'
2552
26-
# - task: PublishTestResults@2
27-
# displayName: publish test results via junit
28-
# condition: succeededOrFailed()
29-
# inputs:
30-
# testResultsFormat: "PyLint"
31-
# testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }}
32-
# testRunTitle: 'MyPy'
53+
- task: PublishTestResults@2
54+
displayName: publish test results via junit
55+
condition: succeededOrFailed()
56+
inputs:
57+
testResultsFormat: "JUnit"
58+
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }}
59+
testRunTitle: 'PyLint'
3360

3461
- job: 'MyPy'
3562
pool:
@@ -43,10 +70,10 @@ jobs:
4370
python -m pip install --upgrade pip
4471
pip install -U setuptools
4572
pip install -r requirements.txt
73+
pip install -U mypy
4674
displayName: 'Install dependencies'
4775
4876
- script: |
49-
pip install -U mypy
5077
mypy --strict --junit-xml=mypy_result.xml exec_helpers
5178
displayName: 'MyPy'
5279

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ six>=1.10.0 # MIT
44
threaded>=2.0 # Apache-2.0
55
PyYAML>=3.12 # MIT
66
advanced-descriptors>=1.0 # Apache-2.0
7-
typing >= 3.6 ; python_version < "3.8"
7+
typing >= 3.6 ; python_version < "3.7"
88
psutil >= 5.0

tox.ini

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ deps =
2323
pytest-cov
2424
pytest-html
2525
pytest-sugar
26-
py{34,35,36,37}-nocov: Cython
26+
py{36,37}-nocov: Cython
2727
-r{toxinidir}/CI_REQUIREMENTS.txt
2828

2929
commands =
@@ -103,8 +103,16 @@ exclude =
103103
ignore =
104104
E203,
105105
W503
106+
D401,
107+
D202,
108+
D203,
109+
D213
106110
# whitespace before ':'
107111
# line break before binary operator
112+
# First line should be in imperative mood; try rephrasing
113+
# No blank lines allowed after function docstring
114+
# 1 blank line required before class docstring
115+
# Multi-line docstring summary should start at the second line
108116
show-pep8 = True
109117
show-source = True
110118
count = True
@@ -145,7 +153,7 @@ commands = pipdeptree
145153

146154
[testenv:mypy]
147155
deps =
148-
mypy>=0.660
156+
mypy>=0.670
149157
lxml
150158
-r{toxinidir}/CI_REQUIREMENTS.txt
151159
commands = mypy --strict --xslt-html-report mypy_report -p exec_helpers

0 commit comments

Comments
 (0)