ruff/crates/ty_python_semantic/resources/mdtest
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
..
annotations
assignment
binary
boolean
boundness_declaredness
call
class
comparison
comprehensions
conditional
declaration
diagnostics
directives
doc
exception
expression
function [ty] Fix false-positive [invalid-return-type] diagnostics on generator functions (#17871) 2025-05-05 21:44:59 +00:00
generics [ty] Don't require default typevars when specializing (#17872) 2025-05-05 18:29:30 -04:00
import
literal
loops
narrow
regression
scopes
shadowing
snapshots [ty] Fix false-positive [invalid-return-type] diagnostics on generator functions (#17871) 2025-05-05 21:44:59 +00:00
stubs
subscript
suppressions
type_of
type_properties
type_qualifiers
unary
with
.mdformat.toml
attributes.md
cycle.md [ty] add cycle handling for FunctionType::signature query (#17833) 2025-05-05 12:12:38 -07:00
dataclass_transform.md
dataclasses.md
decorators.md [ty] Specialize bound methods and nominal instances (#17865) 2025-05-05 17:17:36 -04:00
descriptor_protocol.md
final.md
intersection_types.md
invalid_syntax.md
known_constants.md
mdtest_config.md
mdtest_custom_typeshed.md
metaclass.md
mro.md
named_tuple.md
overloads.md
pep695_type_aliases.md
properties.md
protocols.md
slots.md
statically_known_branches.md
sys_platform.md
sys_version_info.md
terminal_statements.md
type_api.md
typed_dict.md
union_types.md
unpacking.md
unreachable.md