ruff/crates/red_knot_python_semantic/src
David Peter f1f3bd1cd3
[red-knot] Review remaining 'possibly unbound' call sites (#14284)
## Summary

- Emit diagnostics when looking up (possibly) unbound attributes
- More explicit test assertions for unbound symbols
- Review remaining call sites of `Symbol::ignore_possibly_unbound`. Most
of them are something like `builtins_symbol(self.db,
"Ellipsis").ignore_possibly_unbound().unwrap_or(Type::Unknown)` which
look okay to me, unless we want to emit additional diagnostics. There is
one additional case in enum literal handling, which has a TODO comment
anyway.

part of #14022

## Test Plan

New MD tests for (possibly) unbound attributes.
2024-11-11 20:48:49 +01:00
..
module_resolver Enable nursery rules: 'redundant_clone', 'debug_assert_with_mut_call', and 'unused_peekable' (#13920) 2024-10-25 09:46:30 +02:00
semantic_index [red-knot] Symbol API improvements, part 2 (#14276) 2024-11-11 15:24:27 +01:00
types [red-knot] Review remaining 'possibly unbound' call sites (#14284) 2024-11-11 20:48:49 +01:00
util [red-knot] Improve ergonomics for the PySlice trait (#13983) 2024-10-29 20:40:59 +00:00
ast_node_ref.rs Enable nursery rules: 'redundant_clone', 'debug_assert_with_mut_call', and 'unused_peekable' (#13920) 2024-10-25 09:46:30 +02:00
db.rs Rename the ruff_vendored crate to red_knot_vendored (#13586) 2024-10-01 16:16:59 +01:00
lib.rs Cached inference of all definitions in an unpacking (#13979) 2024-11-04 17:11:57 +05:30
module_name.rs [red-knot] Add support for relative imports (#12910) 2024-08-16 12:35:27 +01:00
node_key.rs Implement AstNode for Identifier (#13207) 2024-09-02 16:27:12 +05:30
program.rs Eagerly validate typeshed versions (#12786) 2024-08-21 15:49:53 +00:00
python_version.rs Add Python version support to ruff analyze CLI (#13426) 2024-09-20 15:40:47 -04:00
semantic_index.rs fix double inference of standalone expressions (#14107) 2024-11-05 15:50:31 +01:00
semantic_model.rs [red-knot] Remove Type::Unbound (#13980) 2024-10-31 20:05:53 +01:00
site_packages.rs Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
stdlib.rs [red-knot] Infer Literal types from comparisons with sys.version_info (#14244) 2024-11-11 13:58:16 +00:00
symbol.rs [red-knot] Symbol API improvements, part 2 (#14276) 2024-11-11 15:24:27 +01:00
types.rs [red-knot] Symbol API improvements, part 2 (#14276) 2024-11-11 15:24:27 +01:00
unpack.rs Remove AST-node dependency from FunctionType and ClassType (#14087) 2024-11-05 08:02:38 +00:00