]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
replace `self` param with more appropriate `cls` in classmethods (GH-31402)
authorJosh Smith <cmyuiosu@gmail.com>
Sun, 20 Feb 2022 12:31:09 +0000 (07:31 -0500)
committerGitHub <noreply@github.com>
Sun, 20 Feb 2022 12:31:09 +0000 (14:31 +0200)
Lib/_collections_abc.py

index 97913c77721da955bfa2a2eef05440065421fc48..40417dc1d3133dafc7c9183681aa1da5535c6f01 100644 (file)
@@ -871,7 +871,7 @@ class KeysView(MappingView, Set):
     __slots__ = ()
 
     @classmethod
-    def _from_iterable(self, it):
+    def _from_iterable(cls, it):
         return set(it)
 
     def __contains__(self, key):
@@ -889,7 +889,7 @@ class ItemsView(MappingView, Set):
     __slots__ = ()
 
     @classmethod
-    def _from_iterable(self, it):
+    def _from_iterable(cls, it):
         return set(it)
 
     def __contains__(self, item):