New submission from Nikita Sobolev <m...@sobolevn.me>:

Why is this important?
1. Because multiple inheritance of `TypedDict` might not handle 
`__required_keys__`, or `__optional_keys__`, or `__annotations__` correctly, 
this is especially important because some classes might be defined as 
`total=False` and some as `total=True`
2. Some classes might be defined inline as `T = TypedDict('T', ...)`
3. Moreover, we have a special error we have to check: all superclasses must be 
`TypedDict`s as well (coverage shows that this error is not covered) 
https://github.com/python/cpython/blob/650720a0cfa1673938e6d1bad53b6c37c9edb47d/Lib/typing.py#L2328-L2331

I will send a PR for this.

----------
components: Tests
messages: 411030
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Multiple inheritance of TypedDict is not covered in `test_typing`
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46445>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to