# Typing feature to statically get all subclasses of class

**URL:** <https://discuss.python.org/t/typing-feature-to-statically-get-all-subclasses-of-class/108671>\
**Category:** Ideas\
**Tags:** typing\
**Created:** [August 20, 2026, 6:40pm UTC](https://discuss.python.org/t/typing-feature-to-statically-get-all-subclasses-of-class/108671 "2026-08-20T18:40:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jorenham](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jorenham/32/27806_2.png) [@jorenham](https://discuss.python.org/u/jorenham)\
**Post date:** [August 20, 2026, 6:57pm UTC](https://discuss.python.org/t/typing-feature-to-statically-get-all-subclasses-of-class/108671/3 "2026-08-20T18:57:44Z")

</div>

I’m afraid this won’t work because Python’s type system is isn’t closed-world, so type-checkers can’t reliably determine all of the subclasses that exist. One way around this could be by adding support for sealed classes from e.g. [Draft PEP: Sealed decorator for static typing](https://discuss.python.org/t/draft-pep-sealed-decorator-for-static-typing/49206), but this proposal seems to have stranded.

---

_[View the full topic](https://discuss.python.org/t/typing-feature-to-statically-get-all-subclasses-of-class/108671)._
