From 025c73000850b3bfa07ac48f481bfc78cee51a1e Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Sun, 20 Feb 2022 07:31:09 -0500 Subject: [PATCH] replace `self` param with more appropriate `cls` in classmethods (GH-31402) (cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) 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 acfaff802f5063..023ac7cf036958 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -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):