Message416903
There is of course no hard reason for not using the global scope. I just often have enums (or other types) that are very closely linked to one class. And it makes sense to me then to have a TypeAlias in that class so that I don't have to import the enum separately.
For normal classes, the nested TypeAlias works completely fine in the type checkers I tested (pyright and mypy). It's just dataclasses that are the problem.
But I see now that there is a general wish to keep the implementation of dataclass simple, which I can understand. |
|
Date |
User |
Action |
Args |
2022-04-06 22:47:22 | thomkeh | set | recipients:
+ thomkeh, eric.smith, JelleZijlstra, AlexWaygood, GBeauregard |
2022-04-06 22:47:22 | thomkeh | set | messageid: <1649285242.44.0.207528994928.issue47166@roundup.psfhosted.org> |
2022-04-06 22:47:22 | thomkeh | link | issue47166 messages |
2022-04-06 22:47:22 | thomkeh | create | |
|