Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignorePatterns glob is no longer relative to the project root #338

Open
DetachHead opened this issue Jan 9, 2025 · 0 comments
Open

ignorePatterns glob is no longer relative to the project root #338

DetachHead opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@DetachHead
Copy link
Contributor

this seems to be a regression caused by #220

the ignorePatterns used to work relative to the root of the project, but this no longer seems to be the case. for example when ignoring the file foo.py in the project root, the pattern foo.py used to work, but now i have to use **/foo.py because it appears to now be matching against the full path instead.

Diagnostic Data

  • Python version (& distribution if applicable, e.g., Anaconda): 3.13.1
  • Type of virtual environment used (e.g., conda, venv, virtualenv, etc.): uv
  • Operating system (and version): windows 11
  • Version of tool extension you are using: 2024.0.0

Behaviour

Expected Behavior

file is ignored

Actual Behavior

file is not ignored

Reproduction Steps:

specify a file that's located in the project root to be ignored, eg:

{
    "mypy-type-checker.ignorePatterns": ["foo.py"]
}
# ./foo.py
foo: int = ""

Logs:

Click here for detailed logs
2025-01-09 11:12:32.073 [info] c:\Users\user\project\.venv\Scripts\python.exe -m mypy --no-color-output --no-error-summary --show-absolute-path --show-column-numbers --show-error-codes --no-pretty --ide --hide-error-code-links --show-error-end c:\Users\user\project\foo.py
2025-01-09 11:12:32.073 [info] [Trace - 11:12:32 AM] Received notification 'window/logMessage'.
2025-01-09 11:12:32.073 [info] CWD Server: c:\Users\user\project
2025-01-09 11:12:34.796 [info] [Trace - 11:12:34 AM] Received notification 'window/logMessage'.
2025-01-09 11:12:34.797 [info] file:///c%3A/Users/user/project/foo.py :
c:\Users\user\project\foo.py:1:12:1:13: error: Incompatible types in assignment (expression has type "str", variable has type "int")  [assignment]

2025-01-09 11:12:34.797 [info] [Trace - 11:12:34 AM] Received notification 'window/logMessage'.
2025-01-09 11:12:34.797 [info] file:///c%3A/Users/user/project/foo.py :
c:\Users\user\project\foo.py:1:12:1:13: error: Incompatible types in assignment (expression has type "str", variable has type "int")  [assignment]

2025-01-09 11:12:34.797 [info] [Trace - 11:12:34 AM] Received notification 'textDocument/publishDiagnostics'.
@DetachHead DetachHead added the bug Issue identified by VS Code Team member as probable bug label Jan 9, 2025
@karthiknadig karthiknadig self-assigned this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants