diff options
author | smosker <smosker@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
commit | dd14d17a747a9c259858faf2fcc3ea6b92df4e15 (patch) | |
tree | f332cd81782832c17c48d8c3b4511924cd9e47fd /contrib/python/attrs/attr/_compat.py | |
parent | b637e2fa3213638fbabe52c15dad14c8237945ac (diff) | |
download | ydb-dd14d17a747a9c259858faf2fcc3ea6b92df4e15.tar.gz |
Restoring authorship annotation for <smosker@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/attrs/attr/_compat.py')
-rw-r--r-- | contrib/python/attrs/attr/_compat.py | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/contrib/python/attrs/attr/_compat.py b/contrib/python/attrs/attr/_compat.py index 6939f338da..1d95958354 100644 --- a/contrib/python/attrs/attr/_compat.py +++ b/contrib/python/attrs/attr/_compat.py @@ -14,7 +14,7 @@ if PYPY or sys.version_info[:2] >= (3, 6): ordered_dict = dict else: from collections import OrderedDict - + ordered_dict = OrderedDict @@ -51,45 +51,45 @@ if PY2: def __setitem__(self, key, val): # We gently pretend we're a Python 3 mappingproxy. - raise TypeError( - "'mappingproxy' object does not support item assignment" - ) + raise TypeError( + "'mappingproxy' object does not support item assignment" + ) def update(self, _): # We gently pretend we're a Python 3 mappingproxy. - raise AttributeError( - "'mappingproxy' object has no attribute 'update'" - ) + raise AttributeError( + "'mappingproxy' object has no attribute 'update'" + ) def __delitem__(self, _): # We gently pretend we're a Python 3 mappingproxy. - raise TypeError( - "'mappingproxy' object does not support item deletion" - ) + raise TypeError( + "'mappingproxy' object does not support item deletion" + ) def clear(self): # We gently pretend we're a Python 3 mappingproxy. - raise AttributeError( - "'mappingproxy' object has no attribute 'clear'" - ) + raise AttributeError( + "'mappingproxy' object has no attribute 'clear'" + ) def pop(self, key, default=None): # We gently pretend we're a Python 3 mappingproxy. - raise AttributeError( - "'mappingproxy' object has no attribute 'pop'" - ) + raise AttributeError( + "'mappingproxy' object has no attribute 'pop'" + ) def popitem(self): # We gently pretend we're a Python 3 mappingproxy. - raise AttributeError( - "'mappingproxy' object has no attribute 'popitem'" - ) + raise AttributeError( + "'mappingproxy' object has no attribute 'popitem'" + ) def setdefault(self, key, default=None): # We gently pretend we're a Python 3 mappingproxy. - raise AttributeError( - "'mappingproxy' object has no attribute 'setdefault'" - ) + raise AttributeError( + "'mappingproxy' object has no attribute 'setdefault'" + ) def __repr__(self): # Override to be identical to the Python 3 version. @@ -105,8 +105,8 @@ if PY2: We only warn on Python 3 because we are not aware of any concrete consequences of not setting the cell on Python 2. """ - - + + else: # Python 3 and later. from collections.abc import Mapping, Sequence # noqa @@ -144,10 +144,10 @@ def make_set_closure_cell(): # pypy makes this easy. (It also supports the logic below, but # why not do the easy/fast thing?) if PYPY: - + def set_closure_cell(cell, value): cell.__setstate__((value,)) - + return set_closure_cell # Otherwise gotta do it the hard way. |