pyCharm inspection fixes. Mostly variable refernce issues

This commit is contained in:
Ebag333
2017-02-08 17:55:20 -08:00
parent de87c992d7
commit 3e916e42f2
24 changed files with 70 additions and 51 deletions

View File

@@ -30,6 +30,7 @@ class OrderedDict(dict):
because their insertion order is arbitrary.
'''
super(OrderedDict, self).__init__(**kwds)
if len(args) > 1:
raise TypeError('expected at most 1 arguments, got %d' % len(args))
try:
@@ -193,8 +194,10 @@ class OrderedDict(dict):
self[key] = default
return default
def __repr__(self, _repr_running={}):
def __repr__(self, _repr_running=None):
'od.__repr__() <==> repr(od)'
if _repr_running is None:
_repr_running = {}
call_key = id(self), _get_ident()
if call_key in _repr_running:
return '...'