ruff/crates/red_knot_python_semantic/resources/mdtest/import
Alex Waygood d21d639ee0
[red-knot] Avoid false-positive diagnostics on * import statements (#16899)
## Summary

This PR removes false-positive diagnostics for `*` imports. Currently we
always emit a diagnostic for these statements unless the module we're
importing from has a symbol named `"*"` in its symbol table for the
global scope. (And if we were doing everything correctly, no module ever
would have a symbol named `"*"` in its global scope!)

The fix here is sort-of hacky and won't be what we'll want to do
long-term. However, I think it's useful to do this as a first step
since:
- It significantly reduces false positives when running on code that
uses `*` imports
- It "resets" the tests to a cleaner state with many fewer TODOs, making
it easier to see what the hard work is that's still to be done.

## Test Plan

`cargo test -p red_knot_python_semantic`
2025-03-21 14:41:49 +00:00
..
basic.md [red-knot] Case sensitive module resolver (#16521) 2025-03-14 19:16:44 +00:00
builtins.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
case_sensitive.md [red-knot] Case sensitive module resolver (#16521) 2025-03-14 19:16:44 +00:00
conditional.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
conflicts.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
conventions.md [red-knot] Support re-export conventions for stub files (#16073) 2025-02-14 15:17:51 +05:30
errors.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
invalid_syntax.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
relative.md [red-knot] Partial revert of relative import handling for files in the root of a search path (#16001) 2025-02-07 11:04:09 +01:00
star.md [red-knot] Avoid false-positive diagnostics on * import statements (#16899) 2025-03-21 14:41:49 +00:00
stubs.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
tracking.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00