| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This can only be done at the same time as removing the second branch here: typeshed/stdlib/asyncio/queues.pyi Lines 7 to 10 in 7ff653f |
Sorry, something went wrong.
ruff disagrees. :P |
Sorry, something went wrong.
|
Ohhh, CI now passes here because you removed the pyright-3.9 CI check in the other PR. Hmm, but I'd still lean towards removing the second branch here at the same time as rearranging the order of the base classes? Pyright's previous complaint -- which is what prompted the noqa suppression -- was not a false positive. It was accurately flagging that it really is impossible for type checkers to infer the MRO of a class that inherits from two bases where the first is object and the second is Generic[_T]. It fails at runtime too; there's no way for C3 linearisation to succeed with that sequence of bases: >>> from typing import Generic, TypeVar
>>> _T = TypeVar("_T")
>>> _LoopBoundMixin = object
>>> class Queue(_LoopBoundMixin, Generic[_T]): ...
...
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
class Queue(_LoopBoundMixin, Generic[_T]): ...
TypeError: Cannot create a consistent method resolution order (MRO) for bases object, Generic |
Sorry, something went wrong.
|
Makes sense. I've deferred this for now, and added it to #13782. |
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.