mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:51:25 +00:00
Fix problem with fallback classes (again)
This commit is contained in:
parent
3c097bfd59
commit
e1b548eaa2
5 changed files with 124 additions and 27 deletions
|
@ -277,7 +277,6 @@ reveal_type(Person._make(("Alice", 42))) # revealed: Unknown
|
|||
|
||||
person = Person("Alice", 42)
|
||||
|
||||
# error: [invalid-argument-type] "Argument to bound method `_asdict` is incorrect: Expected `NamedTupleFallback`, found `Person`"
|
||||
reveal_type(person._asdict()) # revealed: dict[str, Any]
|
||||
reveal_type(person._replace(name="Bob")) # revealed: Person
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue