From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 21 Feb 2022 00:10:35 +0000 (-0800) Subject: replace `self` param with more appropriate `cls` in classmethods (GH-31402) (#31445) X-Git-Tag: v3.9.11~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7115d53632bebf137ca7245a9ced7107c082e99;p=thirdparty%2FPython%2Fcpython.git replace `self` param with more appropriate `cls` in classmethods (GH-31402) (#31445) (cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) Co-authored-by: Josh Smith Co-authored-by: Josh Smith --- diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index acfaff802f50..023ac7cf0369 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):