We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cb8090 commit 1aa7dbdCopy full SHA for 1aa7dbd
1 file changed
src/pytest_mypy/__init__.py
@@ -234,7 +234,10 @@ def runtest(self) -> None:
234
"""Raise an exception if mypy found errors for this item."""
235
results = MypyResults.from_session(self.session)
236
abspath = str(self.path.resolve())
237
- errors = results.abspath_errors.get(abspath)
+ errors = [
238
+ error.partition(":")[2].strip()
239
+ for error in results.abspath_errors.get(abspath, [])
240
+ ]
241
if errors:
242
if not all(
243
error.partition(":")[2].partition(":")[0].strip() == "note"
@@ -327,7 +330,7 @@ def from_mypy(
327
330
path, _, error = line.partition(":")
328
331
abspath = str(Path(path).resolve())
329
332
try:
- abspath_errors[abspath].append(error)
333
+ abspath_errors[abspath].append(line)
334
except KeyError:
335
unmatched_lines.append(line)
336
0 commit comments