diff --git a/README.md b/README.md index 5ecb260b9ed8..6225a001b9e6 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ This submodule contains types for the Python standard library. Due to the way git submodules work, you'll have to do ``` - git submodule update typeshed + git submodule update mypy/typeshed ``` whenever you change branches, merge, rebase, or pull. diff --git a/mypy/report.py b/mypy/report.py index d4da7d10dbcf..ae51e1c5fd8d 100644 --- a/mypy/report.py +++ b/mypy/report.py @@ -459,7 +459,12 @@ def on_file(self, type_map: Dict[Expression, Type], options: Options) -> None: self.last_xml = None - path = os.path.relpath(tree.path) + + try: + path = os.path.relpath(tree.path) + except ValueError: + return + if should_skip_path(path): return @@ -813,7 +818,12 @@ def on_file(self, modules: Dict[str, MypyFile], type_map: Dict[Expression, Type], options: Options) -> None: - path = os.path.relpath(tree.path) + + try: + path = os.path.relpath(tree.path) + except ValueError: + return + if should_skip_path(path): return diff --git a/test-data/unit/check-incremental.test b/test-data/unit/check-incremental.test index 08807fc61c1d..ba71e5f8d415 100644 --- a/test-data/unit/check-incremental.test +++ b/test-data/unit/check-incremental.test @@ -4117,7 +4117,9 @@ class C: [out2] main:5: error: Incompatible types in assignment (expression has type "str", variable has type "int") -[case testBazelFlagIgnoresFileChanges] +[case testBazelFlagIgnoresFileChanges-skip] +-- This test fails on windows, when the mypy source in on a different drive than +-- the run-directory. In this case os.path.relpath(...) fails with an exception -- Since the initial run wrote a cache file, the second run ignores the source # flags: --bazel from a import f pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy