From 5212650be4f96e0a2189f5b3fa7c8510d5254f2a Mon Sep 17 00:00:00 2001 From: Snir Shechter Date: Wed, 8 May 2024 21:00:24 +0300 Subject: [PATCH] Cross-environment compatibility --- mypy_baseline/_error.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy_baseline/_error.py b/mypy_baseline/_error.py index 72aa6cf..1a91a3f 100644 --- a/mypy_baseline/_error.py +++ b/mypy_baseline/_error.py @@ -80,7 +80,7 @@ def category(self) -> str: return self._match.group('category') or 'note' def get_clean_line(self, config: Config) -> str: - path = Path(*self.path.parts[:config.depth]) + path = str(Path(*self.path.parts[:config.depth])).replace('\\', '/') pos = self.line_number if config.preserve_position else 0 msg = REX_COLOR.sub('', self.message).strip() msg = REX_COLOR_NBQA.sub('', msg).strip()