Skip to content

Commit 0cb8090

Browse files
committed
Use Path.resolve instead of Path.absolute
1 parent 14c281a commit 0cb8090

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pytest_mypy/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class MypyFileItem(MypyItem):
233233
def runtest(self) -> None:
234234
"""Raise an exception if mypy found errors for this item."""
235235
results = MypyResults.from_session(self.session)
236-
abspath = str(self.path.absolute())
236+
abspath = str(self.path.resolve())
237237
errors = results.abspath_errors.get(abspath)
238238
if errors:
239239
if not all(
@@ -312,7 +312,7 @@ def from_mypy(
312312
if opts is None:
313313
opts = mypy_argv[:]
314314
abspath_errors = {
315-
str(path.absolute()): [] for path in paths
315+
str(path.resolve()): [] for path in paths
316316
} # type: MypyResults._abspath_errors_type
317317

318318
cwd = Path.cwd()
@@ -325,7 +325,7 @@ def from_mypy(
325325
if not line:
326326
continue
327327
path, _, error = line.partition(":")
328-
abspath = str(Path(path).absolute())
328+
abspath = str(Path(path).resolve())
329329
try:
330330
abspath_errors[abspath].append(error)
331331
except KeyError:

0 commit comments

Comments
 (0)