basedpyright
basedpyright copied to clipboard
`reportUnusedFunction` false negative on protected methods of `@final` classes
Code sample in basedpyright playground
from typing import final
def _foo(): # error
...
@final
class Foo:
def _foo(self): ... # no error
upstream issue: https://github.com/microsoft/pyright/issues/4951
the reason it was rejected was because a subclass could use it, but it should at least work on @final classes