ruff/crates/red_knot_python_semantic
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
..
resources [red-knot] Avoid false-positive diagnostics on * import statements (#16899) 2025-03-21 14:41:49 +00:00
src [red-knot] Avoid false-positive diagnostics on * import statements (#16899) 2025-03-21 14:41:49 +00:00
tests red_knot_test: add support for diagnostic snapshotting 2025-02-05 13:02:54 -05:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
Cargo.toml [red-knot] Add a test to ensure that KnownClass::try_from_file_and_name() is kept up to date (#16326) 2025-02-24 12:14:20 +00:00
mdtest.py [red-knot] Fix possible TOCTOU mistake in mdtest runner (#15673) 2025-01-22 15:24:25 +00:00
mdtest.py.lock [red-knot] Markdown test runner (#15632) 2025-01-21 14:06:35 +01:00