-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reportUnusedFunction
on unused protected methods when the class is …
…decorated with `@final`
- Loading branch information
1 parent
9d51849
commit 9bbaec9
Showing
3 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/pyright-internal/src/tests/samples/reportUnusedFunction_final.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from typing import final | ||
|
||
@final | ||
class Foo: | ||
def foo(self): ... # no error | ||
def _foo(self): ... # error | ||
def __bar(self): ... # error | ||
|
||
class Bar: | ||
def foo(self): ... # no error | ||
def _foo(self): ... # no error | ||
def __bar(self): ... # error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters