From 6270d825c523a1a432d556dbd0a4b1585ad4de77 Mon Sep 17 00:00:00 2001 From: Matus Valo Date: Sun, 27 Mar 2022 14:10:47 +0200 Subject: [PATCH] Added bad-classmethod-argument example (#5996) --- doc/data/messages/b/bad-classmethod-argument/bad.py | 5 +++++ doc/data/messages/b/bad-classmethod-argument/good.py | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 doc/data/messages/b/bad-classmethod-argument/bad.py create mode 100644 doc/data/messages/b/bad-classmethod-argument/good.py diff --git a/doc/data/messages/b/bad-classmethod-argument/bad.py b/doc/data/messages/b/bad-classmethod-argument/bad.py new file mode 100644 index 0000000000..7e43001b59 --- /dev/null +++ b/doc/data/messages/b/bad-classmethod-argument/bad.py @@ -0,0 +1,5 @@ +class Klass: + + @classmethod + def get_instance(self): # [bad-classmethod-argument] + return self() diff --git a/doc/data/messages/b/bad-classmethod-argument/good.py b/doc/data/messages/b/bad-classmethod-argument/good.py new file mode 100644 index 0000000000..3d4decea36 --- /dev/null +++ b/doc/data/messages/b/bad-classmethod-argument/good.py @@ -0,0 +1,5 @@ +class Klass: + + @classmethod + def get_instance(cls): + return cls()