PY3.W2602
Using final decorator in unsupported version
Used when the py-version set by the user is lower than 3.8 and pylint encounters a typing.final
decorator.
Noncompliant Code:
Copy
from typing import final
@final # [using-final-decorator-in-unsupported-version]
class Playtypus(Animal):
@final # [using-final-decorator-in-unsupported-version]
def lay_egg(self):
...
Compliant Code:
Copy
class Playtypus(Animal):
def lay_egg(self):
...
Additional Details:
The message is emitted when the final decorator is used with a Python version less than 3.8. The final decorator was introduced in Python version 3.8.