]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] replace `self` param with more appropriate `cls` in classmethods (GH-31402...
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 20 Feb 2022 13:45:13 +0000 (15:45 +0200)
committerGitHub <noreply@github.com>
Sun, 20 Feb 2022 13:45:13 +0000 (15:45 +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 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):