Closed
Description
Bug Report
Overriding class methods marked with @final
(pep-0591) are not reported as errors. The example script will not produce an error with mypy
even though it probably should.
#9612 is potentially related, but they have a final
problem in the other direction.
To Reproduce
from typing import final
class Base:
@final
def foo(self):
pass
def bar(self):
pass
class Derived(Base):
def foo(self):
pass
Your Environment
✗ python --version && mypy --version && mypy foo.py
Python 3.8.5
mypy 0.790
Success: no issues found in 1 source file