Closed
Description
Today I got hit by this. This was the source code:
from typing import final
@final
class A: ...
This was the stub:
class A: ...
But, stubtest
allowed this.
I think that we should also check for __final__
attribute.
For example, some stdlib code already has @final
decorators applied, like: https://github.com/python/cpython/blob/e1e9bab0061e8d4bd7b94ed455f3bb7bf8633ae7/Lib/asyncio/timeouts.py#L26
I will send a PR with the fix.