Skip to content

Commit

Permalink
Use a real world example
Browse files Browse the repository at this point in the history
  • Loading branch information
mbyrnepr2 committed Apr 5, 2022
1 parent 5f39efe commit 5ee5eb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions doc/data/messages/o/overridden-final-method/bad.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import final


class Base:
class Animal:
@final
def my_method(self):
pass
def can_breath(self):
return True


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


class Base:
class Animal:
@final
def my_method(self):
pass
def can_breathe(self):
return True


class Subclass(Base):
def my_other_method(self):
pass
class Cat(Animal):
def can_purr(self):
return True

0 comments on commit 5ee5eb7

Please sign in to comment.