8000 Fix visual indent (#359) · python/typing@1830f2e · GitHub
[go: up one dir, main page]

Skip to content

Commit 1830f2e

Browse files
ambvilevkivskyi
authored andcommitted
Fix visual indent (#359)
1 parent 17e1b5b commit 1830f2e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

python2/typing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def _qualname(x):
8888

8989

9090
def _trim_name(nm):
91-
if nm.startswith('_') and nm not in ('_TypeAlias',
92-
'_ForwardRef', '_TypingBase', '_FinalTypingBase'):
91+
whitelist = ('_TypeAlias', '_ForwardRef', '_TypingBase', '_FinalTypingBase')
92+
if nm.startswith('_') and nm not in whitelist:
9393
nm = nm[1:]
9494
return nm
9595

src/typing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def _qualname(x):
9797

9898

9999
def _trim_name(nm):
100-
if nm.startswith('_') and nm not in ('_TypeAlias',
101-
'_ForwardRef', '_TypingBase', '_FinalTypingBase'):
100+
whitelist = ('_TypeAlias', '_ForwardRef', '_TypingBase', '_FinalTypingBase')
101+
if nm.startswith('_') and nm not in whitelist:
102102
nm = nm[1:]
103103
return nm
104104

@@ -455,7 +455,7 @@ def longest(x: A, y: A) -> A:
455455
'__covariant__', '__contravariant__')
456456

457457
def __init__(self, name, *constraints, bound=None,
458-
covariant=False, contravariant=False):
458+
covariant=False, contravariant=False):
459459
super().__init__(name, *constraints, bound=bound,
460460
covariant=covariant, contravariant=contravariant)
461461
self.__name__ = name
@@ -1776,11 +1776,11 @@ class MutableMapping(Mapping[KT, VT], extra=collections_abc.MutableMapping):
17761776
if hasattr(collections_abc, 'Reversible'):
17771777
if hasattr(collections_abc, 'Collection'):
17781778
class Sequence(Reversible[T_co], Collection[T_co],
1779-
extra=collections_abc.Sequence):
1779+
extra=collections_abc.Sequence):
17801780
__slots__ = ()
17811781
else:
17821782
class Sequence(Sized, Reversible[T_co], Container[T_co],
1783-
extra=collections_abc.Sequence):
1783+
extra=collections_abc.Sequence):
17841784
__slots__ = ()
17851785
else:
17861786
class Sequence(Sized, Iterable[T_co], Container[T_co],

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ changedir = python2
1313
builtins = basestring, unicode
1414
ignore =
1515
# temporary ignores until we sort it out
16-
E128,
1716
E129,
1817
E501,
1918
W503,

0 commit comments

Comments
 (0)
0