Skip to content

Commit

Permalink
Added bad-classmethod-argument example (#5996)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusvalo committed Mar 27, 2022
1 parent 3356ed4 commit 6270d82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/data/messages/b/bad-classmethod-argument/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Klass:

@classmethod
def get_instance(self): # [bad-classmethod-argument]
return self()
5 changes: 5 additions & 0 deletions doc/data/messages/b/bad-classmethod-argument/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Klass:

@classmethod
def get_instance(cls):
return cls()

0 comments on commit 6270d82

Please sign in to comment.