mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
replace self param with more appropriate cls in classmethods (GH-31402)
This commit is contained in:
parent
1f9d4c93af
commit
a3fcca4af1
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user