Skip to content

Commit 9e44462

Browse files
authored
Merge pull request #143 from dmtucker/mypy0.990
Add support for mypy-0.990
2 parents 5cc71fd + f0f3c97 commit 9e44462

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/pytest_mypy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ def from_mypy(
262262
os.path.abspath(str(item.fspath)): [] for item in items
263263
} # type: MypyResults._abspath_errors_type
264264

265-
stdout, stderr, status = mypy.api.run(opts + list(abspath_errors))
265+
stdout, stderr, status = mypy.api.run(
266+
opts + [os.path.relpath(key) for key in abspath_errors.keys()]
267+
)
266268

267269
unmatched_lines = []
268270
for line in stdout.split("\n"):

tests/test_pytest_mypy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def pyfunc(x):
364364
""",
365365
)
366366
result = testdir.runpytest_subprocess("--mypy", *xdist_args)
367-
result.stdout.fnmatch_lines(["1: error: Function is missing a type annotation"])
367+
result.stdout.fnmatch_lines(["1: error: Function is missing a type annotation*"])
368368
assert result.ret != 0
369369

370370

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ deps =
7171
mypy0.95: mypy >= 0.950, < 0.960
7272
mypy0.96: mypy >= 0.960, < 0.970
7373
mypy0.97: mypy >= 0.970, < 0.980
74+
mypy0.98: mypy >= 0.980, < 0.990
75+
mypy0.99: mypy >= 0.990, <= 0.999
7476
mypy0.9x: mypy >= 0.900, <= 0.999
7577

7678
packaging ~= 21.3

0 commit comments

Comments
 (0)