-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[red-knot] Do not attach diagnostics to wrong file (#14337)
## Summary Avoid attaching diagnostics to the wrong file. See related issue for details. Closes #14334 ## Test Plan New regression test.
- Loading branch information
Showing
3 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
..._python_semantic/resources/mdtest/regression/14334_diagnostics_in_wrong_file.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Regression test for #14334 | ||
|
||
Regression test for [this issue](https://github.com/astral-sh/ruff/issues/14334). | ||
|
||
```py path=base.py | ||
# error: [invalid-base] | ||
class Base(2): ... | ||
``` | ||
|
||
```py path=a.py | ||
# No error here | ||
from base import Base | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters