ruff/crates/ty_python_semantic/src
Douglas Creager ada4c4cb1f
[ty] Don't require default typevars when specializing (#17872)
If a typevar is declared as having a default, we shouldn't require a
type to be specified for that typevar when explicitly specializing a
generic class:

```py
class WithDefault[T, U = int]: ...

reveal_type(WithDefault[str]())  # revealed: WithDefault[str, int]
```

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-05-05 18:29:30 -04:00
..
module_resolver Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
semantic_index [ty] Fix false-positive [invalid-return-type] diagnostics on generator functions (#17871) 2025-05-05 21:44:59 +00:00
types [ty] Don't require default typevars when specializing (#17872) 2025-05-05 18:29:30 -04:00
util Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ast_node_ref.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
db.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
lib.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
lint.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
list.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
module_name.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
node_key.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
program.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
python_platform.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
semantic_index.rs [ty] Fix false-positive [invalid-return-type] diagnostics on generator functions (#17871) 2025-05-05 21:44:59 +00:00
semantic_model.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
site_packages.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
suppression.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
symbol.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
types.rs [ty] Specialize bound methods and nominal instances (#17865) 2025-05-05 17:17:36 -04:00
unpack.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00