mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:17 +00:00
[ty] NamedTuple 'fallback' attributes (#18127)
## Summary Add various attributes to `NamedTuple` classes/instances that are available at runtime. closes https://github.com/astral-sh/ty/issues/417 ## Test Plan New Markdown tests
This commit is contained in:
parent
8644c9da43
commit
e67b35743a
3 changed files with 53 additions and 5 deletions
|
@ -118,6 +118,8 @@ pub enum KnownModule {
|
|||
Dataclasses,
|
||||
Collections,
|
||||
Inspect,
|
||||
#[strum(serialize = "_typeshed._type_checker_internals")]
|
||||
TypeCheckerInternals,
|
||||
TyExtensions,
|
||||
}
|
||||
|
||||
|
@ -135,6 +137,7 @@ impl KnownModule {
|
|||
Self::Dataclasses => "dataclasses",
|
||||
Self::Collections => "collections",
|
||||
Self::Inspect => "inspect",
|
||||
Self::TypeCheckerInternals => "_typeshed._type_checker_internals",
|
||||
Self::TyExtensions => "ty_extensions",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue