Skip to content

Commit 5ea41f8

Browse files
David Fritzschedavidfritzsche
authored andcommitted
Normalize messages to enable support for mypy 0.902 and pytest 6.2.4
1 parent 44383ee commit 5ea41f8

17 files changed

+307
-98
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
max-parallel: 4
1212
matrix:
1313
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: [3.6, 3.7, 3.8]
14+
python-version: [3.6, 3.7, 3.8, 3.9]
1515

1616
steps:
1717
- uses: actions/checkout@v1
@@ -22,8 +22,8 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
python -m pip install -c requirements.txt invoke tox
26-
- name: Run tox for pytest 5.3.x
25+
python -m pip install -c constraints.txt invoke tox
26+
- name: Run tox
2727
env:
2828
TOX_PARALLEL_NO_SPINNER: "1"
2929
run: |
@@ -45,7 +45,7 @@ jobs:
4545
python-version: ${{ matrix.python-version }}
4646
- name: Install dependencies
4747
run: |
48-
python -m pip install -c requirements.txt flake8 flake8-isort black mypy
48+
python -m pip install -c constraints.txt flake8 flake8-isort black mypy
4949
pip list
5050
- name: Run black
5151
run: |
@@ -55,7 +55,7 @@ jobs:
5555
mypy src tests
5656
- name: Run isort
5757
run: |
58-
isort --diff --verbose
58+
isort . --check --diff
5959
- name: Run flake8
6060
run: |
6161
flake8 --help

.isort.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ multi_line_output = 3
99
include_trailing_comma = true
1010
order_by_type = true
1111
skip = .eggs,.git,.tox,build,dist,docs
12+
skip_gitignore = true
1213
lines_after_imports = 2
13-
known_standard_library = contextvars,dataclasses
14-
known_third_party = _pytest,invoke,mypy,py,pytest
1514
known_first_party = pytest_mypy_testing
1615
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

constraints.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#
2+
# This file is autogenerated by lock_requirements.sh
3+
# To update, run:
4+
#
5+
# sh lock_requirements.sh
6+
#
7+
appdirs==1.4.4
8+
attrs==21.2.0
9+
binaryornot==0.4.4
10+
black==21.6b0
11+
boolean.py==3.8
12+
bump2version==1.0.1
13+
certifi==2021.5.30
14+
chardet==4.0.0
15+
click==8.0.1
16+
coverage==5.5
17+
dflit-core==2.3.0.1
18+
dflit==2.3.0.1
19+
distlib==0.3.2
20+
docutils==0.17.1
21+
filelock==3.0.12
22+
flake8-black==0.2.1
23+
flake8-isort==4.0.0
24+
flake8==3.9.2
25+
fsfe-reuse==1.0.0
26+
idna==2.10
27+
iniconfig==1.1.1
28+
invoke==1.5.0
29+
isort==5.8.0
30+
jinja2==3.0.1
31+
license-expression==1.2
32+
markupsafe==2.0.1
33+
mccabe==0.6.1
34+
mypy-extensions==0.4.3
35+
mypy==0.902
36+
packaging==20.9
37+
pathspec==0.8.1
38+
pep517==0.10.0
39+
pip-tools==6.1.0
40+
pluggy==0.13.1
41+
py==1.10.0
42+
pycodestyle==2.7.0
43+
pyflakes==2.3.1
44+
pyparsing==2.4.7
45+
pytest-cov==2.12.1
46+
pytest-html==3.1.1
47+
pytest-metadata==1.11.0
48+
pytest==6.2.4
49+
python-debian==0.1.39
50+
pytoml==0.1.21
51+
regex==2021.4.4
52+
requests==2.25.1
53+
reuse==0.13.0
54+
six==1.16.0
55+
testfixtures==6.17.1
56+
toml==0.10.2
57+
tox-pyenv==1.1.0
58+
tox==3.23.1
59+
typing-extensions==3.10.0.0
60+
urllib3==1.26.5
61+
virtualenv==20.4.7
62+
pip==21.1.2
63+
setuptools==57.0.0

lock_requirements.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
pip-compile --allow-unsafe --no-emit-index-url "$@"
4+
cat >constraints.txt <<EOF
5+
#
6+
# This file is autogenerated by lock_requirements.sh
7+
# To update, run:
8+
#
9+
# sh lock_requirements.sh
10+
#
11+
EOF
12+
sed -E -e 's/(\[.*\])//g' -e '/^ *#/d' -e '/^$/d' requirements.txt >> constraints.txt

mypy.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ follow_imports = silent
2424
ignore_missing_imports = False
2525

2626
# Enables PEP 420 style namespace packages. (default False)
27-
namespace_packages = True
27+
namespace_packages = False
28+
29+
# explicit_package_bases = True
2830

2931
# Type-checks the interior of functions without type annotations (default False)
3032
check_untyped_defs = True

requirements.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# SPDX-FileCopyrightText: David Fritzsche
22
# SPDX-License-Identifier: CC0-1.0
3-
black==19.10b0
3+
black==21.6b0
44
bump2version
55
coverage[toml]
66
dflit
77
flake8-black
88
flake8-isort
99
fsfe-reuse
1010
invoke
11-
mypy==0.770
11+
mypy==0.902
1212
pip-tools
1313
pip>=19.3
1414
pytest-cov
1515
pytest-html
16-
pytest~=5.4.1
16+
pytest~=6.2.4
1717
setuptools>=43
1818
tox-pyenv
1919
tox>=3.14.3

requirements.txt

Lines changed: 162 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,168 @@
22
# This file is autogenerated by pip-compile
33
# To update, run:
44
#
5-
# pip-compile --allow-unsafe --no-index --upgrade
5+
# pip-compile --allow-unsafe --no-emit-index-url
66
#
7-
appdirs==1.4.3 # via black, virtualenv
8-
attrs==19.3.0 # via black, pytest
9-
binaryornot==0.4.4 # via reuse
10-
black==19.10b0 # via -r requirements.in, flake8-black
11-
boolean.py==3.7 # via license-expression, reuse
12-
bump2version==1.0.0 # via -r requirements.in
13-
certifi==2020.4.5.1 # via requests
14-
chardet==3.0.4 # via binaryornot, python-debian, requests
15-
click==7.1.1 # via black, pip-tools
16-
coverage[toml]==5.1 # via -r requirements.in, pytest-cov
17-
dflit-core==2.2.0.1 # via dflit
18-
dflit==2.2.0.1 # via -r requirements.in
19-
distlib==0.3.0 # via virtualenv
20-
docutils==0.16 # via dflit
21-
entrypoints==0.3 # via flake8
22-
filelock==3.0.12 # via tox, virtualenv
23-
flake8-black==0.1.1 # via -r requirements.in
24-
flake8-isort==3.0.0 # via -r requirements.in
25-
flake8==3.7.9 # via flake8-black, flake8-isort
26-
fsfe-reuse==1.0.0 # via -r requirements.in
27-
idna==2.9 # via requests
28-
invoke==1.4.1 # via -r requirements.in
29-
isort[pyproject]==4.3.21 # via flake8-isort
30-
jinja2==2.11.2 # via reuse
31-
license-expression==1.2 # via reuse
32-
markupsafe==1.1.1 # via jinja2
33-
mccabe==0.6.1 # via flake8
34-
more-itertools==8.2.0 # via pytest
35-
mypy-extensions==0.4.3 # via mypy
36-
mypy==0.770 # via -r requirements.in
37-
packaging==20.3 # via pytest, tox
38-
pathspec==0.8.0 # via black
39-
pip-tools==5.0.0 # via -r requirements.in
40-
pluggy==0.13.1 # via pytest, tox
41-
py==1.8.1 # via pytest, tox
42-
pycodestyle==2.5.0 # via flake8
43-
pyflakes==2.1.1 # via flake8
44-
pyparsing==2.4.7 # via packaging
45-
pytest-cov==2.8.1 # via -r requirements.in
46-
pytest-html==2.1.1 # via -r requirements.in
47-
pytest-metadata==1.8.0 # via pytest-html
48-
pytest==5.4.1 # via -r requirements.in, pytest-cov, pytest-html, pytest-metadata
49-
python-debian==0.1.37 # via reuse
50-
pytoml==0.1.21 # via dflit, dflit-core
51-
regex==2020.4.4 # via black
52-
requests==2.23.0 # via dflit, reuse
53-
reuse==0.9.0 # via fsfe-reuse
54-
six==1.14.0 # via packaging, pip-tools, python-debian, tox, virtualenv
55-
testfixtures==6.14.1 # via flake8-isort
56-
toml==0.10.0 # via black, coverage, isort, tox
57-
tox-pyenv==1.1.0 # via -r requirements.in
58-
tox==3.14.6 # via -r requirements.in, tox-pyenv
59-
typed-ast==1.4.1 # via black, mypy
60-
typing-extensions==3.7.4.2 # via mypy
61-
urllib3==1.25.9 # via requests
62-
virtualenv==20.0.18 # via tox
63-
wcwidth==0.1.9 # via pytest
7+
appdirs==1.4.4
8+
# via
9+
# black
10+
# virtualenv
11+
attrs==21.2.0
12+
# via pytest
13+
binaryornot==0.4.4
14+
# via reuse
15+
black==21.6b0
16+
# via
17+
# -r requirements.in
18+
# flake8-black
19+
boolean.py==3.8
20+
# via
21+
# license-expression
22+
# reuse
23+
bump2version==1.0.1
24+
# via -r requirements.in
25+
certifi==2021.5.30
26+
# via requests
27+
chardet==4.0.0
28+
# via
29+
# binaryornot
30+
# python-debian
31+
# requests
32+
click==8.0.1
33+
# via
34+
# black
35+
# pip-tools
36+
coverage[toml]==5.5
37+
# via
38+
# -r requirements.in
39+
# pytest-cov
40+
dflit-core==2.3.0.1
41+
# via dflit
42+
dflit==2.3.0.1
43+
# via -r requirements.in
44+
distlib==0.3.2
45+
# via virtualenv
46+
docutils==0.17.1
47+
# via dflit
48+
filelock==3.0.12
49+
# via
50+
# tox
51+
# virtualenv
52+
flake8-black==0.2.1
53+
# via -r requirements.in
54+
flake8-isort==4.0.0
55+
# via -r requirements.in
56+
flake8==3.9.2
57+
# via
58+
# flake8-black
59+
# flake8-isort
60+
fsfe-reuse==1.0.0
61+
# via -r requirements.in
62+
idna==2.10
63+
# via requests
64+
iniconfig==1.1.1
65+
# via pytest
66+
invoke==1.5.0
67+
# via -r requirements.in
68+
isort==5.8.0
69+
# via flake8-isort
70+
jinja2==3.0.1
71+
# via reuse
72+
license-expression==1.2
73+
# via reuse
74+
markupsafe==2.0.1
75+
# via jinja2
76+
mccabe==0.6.1
77+
# via flake8
78+
mypy-extensions==0.4.3
79+
# via
80+
# black
81+
# mypy
82+
mypy==0.902
83+
# via -r requirements.in
84+
packaging==20.9
85+
# via
86+
# pytest
87+
# tox
88+
pathspec==0.8.1
89+
# via black
90+
pep517==0.10.0
91+
# via pip-tools
92+
pip-tools==6.1.0
93+
# via -r requirements.in
94+
pluggy==0.13.1
95+
# via
96+
# pytest
97+
# tox
98+
py==1.10.0
99+
# via
100+
# pytest
101+
# tox
102+
pycodestyle==2.7.0
103+
# via flake8
104+
pyflakes==2.3.1
105+
# via flake8
106+
pyparsing==2.4.7
107+
# via packaging
108+
pytest-cov==2.12.1
109+
# via -r requirements.in
110+
pytest-html==3.1.1
111+
# via -r requirements.in
112+
pytest-metadata==1.11.0
113+
# via pytest-html
114+
pytest==6.2.4
115+
# via
116+
# -r requirements.in
117+
# pytest-cov
118+
# pytest-html
119+
# pytest-metadata
120+
python-debian==0.1.39
121+
# via reuse
122+
pytoml==0.1.21
123+
# via
124+
# dflit
125+
# dflit-core
126+
regex==2021.4.4
127+
# via black
128+
requests==2.25.1
129+
# via
130+
# dflit
131+
# reuse
132+
reuse==0.13.0
133+
# via fsfe-reuse
134+
six==1.16.0
135+
# via
136+
# python-debian
137+
# tox
138+
# virtualenv
139+
testfixtures==6.17.1
140+
# via flake8-isort
141+
toml==0.10.2
142+
# via
143+
# black
144+
# coverage
145+
# mypy
146+
# pep517
147+
# pytest
148+
# pytest-cov
149+
# tox
150+
tox-pyenv==1.1.0
151+
# via -r requirements.in
152+
tox==3.23.1
153+
# via
154+
# -r requirements.in
155+
# tox-pyenv
156+
typing-extensions==3.10.0.0
157+
# via mypy
158+
urllib3==1.26.5
159+
# via requests
160+
virtualenv==20.4.7
161+
# via tox
64162

65163
# The following packages are considered to be unsafe in a requirements file:
66-
pip==20.0.2 # via -r requirements.in, pip-tools
67-
setuptools==46.1.3 # via -r requirements.in
164+
pip==21.1.2
165+
# via
166+
# -r requirements.in
167+
# pip-tools
168+
setuptools==57.0.0
169+
# via -r requirements.in

src/pytest_mypy_testing/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-FileCopyrightText: 2020 David Fritzsche
22
# SPDX-License-Identifier: Apache-2.0 OR MIT
3-
"""Pytest plugin to check mypy output.
4-
"""
3+
"""Pytest plugin to check mypy output."""
54

65
__version__ = "0.0.7"

0 commit comments

Comments
 (0)