Add new_typeinfo
to public plugin API for both SemanticAnalyzer and TypeChecker
#8257
Labels
topic-plugins
The plugin API and ideas for new plugins
In
django-stubs
, it's used in a lot of places to generate one-off classes.For semanal, there's https://github.com/python/mypy/blob/master/mypy/semanal.py#L3029, which used for the special casing of
NamedTuple
/TypedDict
/others, which basically plugins in the core.For type checking, there's no equivalent, but similar code is used here https://github.com/python/mypy/blob/master/mypy/checker.py#L3659
It would be also nice to be able to specify more than one base class.
The text was updated successfully, but these errors were encountered: