Skip to content

Commit

Permalink
Add documentation examples for overridden-final-method checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mbyrnepr2 committed Mar 31, 2022
1 parent cb9dc79 commit 0f8a264
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/data/messages/o/overridden-final-method/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import final


class Base:
@final
def my_method(self):
pass


class Subclass(Base):
def my_method(self): # [overridden-final-method]
pass
12 changes: 12 additions & 0 deletions doc/data/messages/o/overridden-final-method/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from typing import final


class Base:
@final
def my_method(self):
pass


class Subclass(Base):
def my_other_method(self):
pass

0 comments on commit 0f8a264

Please sign in to comment.