From fa621a738875dc8a644a6149e7ffd4be0a40f1d9 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Sun, 20 Feb 2022 15:45:13 +0200 Subject: [3.10] replace `self` param with more appropriate `cls` in classmethods (GH-31402) (GH-31446) (cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) Co-authored-by: Josh Smith Co-authored-by: Josh Smith --- Lib/_collections_abc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 97913c7..40417dc 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -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): -- cgit v0.12