]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
replace `self` param with more appropriate `cls` in classmethods (GH-31402) (#31445)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 21 Feb 2022 00:10:35 +0000 (16:10 -0800)
committerGitHub <noreply@github.com>
Mon, 21 Feb 2022 00:10:35 +0000 (02:10 +0200)
(cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa)

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Lib/_collections_abc.py

index acfaff802f5063625ab3f7b72c4617534d3627d5..023ac7cf0369583971f34686c6c3c76056c3663a 100644 (file)
@@ -816,7 +816,7 @@ class KeysView(MappingView, Set):
     __slots__ = ()
 
     @classmethod
-    def _from_iterable(self, it):
+    def _from_iterable(cls, it):
         return set(it)
 
     def __contains__(self, key):
@@ -834,7 +834,7 @@ class ItemsView(MappingView, Set):
     __slots__ = ()
 
     @classmethod
-    def _from_iterable(self, it):
+    def _from_iterable(cls, it):
         return set(it)
 
     def __contains__(self, item):