You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Definition of "_from_bytes" in base class "TextSerializable" is incompatible with definition in base class "BinaryFileSerializable" [misc]
error: Definition of "_to_bytes" in base class "TextSerializable" is incompatible with definition in base class "BinaryFileSerializable" [misc]
The error only occurs on B, not A. My guess is that the type: ignore statement on TextFileSerializable (suppressing the error about incompatible method definitions) carries over to simple inheritance but not multiple inheritance.
Not sure if this is a bug in mypy or not, but ideally the method signatures could be fixed to be compatible.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
There's some quirk in the definition of
TextSerializable
which causesmypy
to error when inheriting from it along with some other base class.Minimal example:
Running
mypy
(version 1.14.1), I get:The error only occurs on
B
, notA
. My guess is that thetype: ignore
statement onTextFileSerializable
(suppressing the error about incompatible method definitions) carries over to simple inheritance but not multiple inheritance.Not sure if this is a bug in
mypy
or not, but ideally the method signatures could be fixed to be compatible.The text was updated successfully, but these errors were encountered: