Source code that has @final
decorator does not require @final
in stub
#14921
Labels
@final
decorator does not require @final
in stub
#14921
Today I got hit by this. This was the source code:
This was the stub:
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#L26I will send a PR with the fix.
The text was updated successfully, but these errors were encountered: