[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:
David Peter 2025-05-16 12:56:43 +02:00 committed by GitHub
parent 8644c9da43
commit e67b35743a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 5 deletions

View file

@ -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",
}
}