epogrebnyak / abacus

A small yet valid double-entry accounting system in Python and command line.
https://epogrebnyak.github.io/abacus/
GNU General Public License v3.0
59 stars 4 forks source link

mypy error on subclassing #64

Closed epogrebnyak closed 10 months ago

epogrebnyak commented 10 months ago

mypy fine.py shows error

fine.py:70: note:      Superclass:
fine.py:70: note:          def t_account(self) -> type[RegularAccount] | type[ContraAccount] | type[ExtraAccount]
fine.py:70: note:      Subclass:
fine.py:70: note:          type[RegularAccount]
fine.py:91: error: Signature of "t_account" incompatible with supertype "Holder"  [override]
fine.py:91: note:      Superclass:
fine.py:91: note:          def t_account(self) -> type[RegularAccount] | type[ContraAccount] | type[ExtraAccount]
fine.py:91: note:      Subclass:
fine.py:91: note:          type[ContraAccount]
fine.py:240: error: Signature of "t_account" incompatible with supertype "Holder"  [override]
fine.py:240: note:      Superclass:
fine.py:240: note:          def t_account(self) -> type[RegularAccount] | type[ContraAccount] | type[ExtraAccount]
fine.py:240: note:      Subclass:
fine.py:240: note:          type[ExtraAccount]