Open tabbea opened 8 months ago
Duplicate of https://github.com/microsoft/vscode-mypy/issues/213
May I request a review of whether or not this is a duplicate of #213?
I used @Mutantpenguin's is_match
function from that thread and tested my own patterns and file paths:
import pathlib
def is_match(patterns: list[str], file_path: str) -> bool:
"""Returns true if the file matches one of the glob patterns."""
if not patterns:
return False
return any(pathlib.Path(file_path).match(pattern) for pattern in patterns)
patterns: tp.List[str] = [
"**/graveyard/*.py",
"*/graveyard/*.py",
]
file_path: str = "/mnt/c/Users/bread/Documents/abz_code/graveyard/simulator_old.py"
And this returned True
.
However, mypy is still typechecking the specified file path. As such, my issue seems to be different.
After switching from my local mypy installation to the VSCode mypy extension, I am struggling with mypy failing to ignore the specified files/folders.
My
settings.json
contains the following:The
Mypy Type Checker
confirms this when outputting[info] Global settings:
However, it still outputs the following:
I would appreciate any advice on what I am doing wrong and/or what mypy is doing wrong. Thank you in advance!