mirror of https://github.com/Mikaela/Limnoria.git
Continue accelerating the 2to3 step (remove fix_nonzero, fix_operator, and fix_paren).
This commit is contained in:
parent
d1649a44ac
commit
529b8f8d99
4
setup.py
4
setup.py
|
@ -154,8 +154,8 @@ try:
|
||||||
'fix_imports',
|
'fix_imports',
|
||||||
'fix_itertools', 'fix_itertools_imports', 'fix_long',
|
'fix_itertools', 'fix_itertools_imports', 'fix_long',
|
||||||
'fix_map', 'fix_metaclass', 'fix_methodattrs',
|
'fix_map', 'fix_metaclass', 'fix_methodattrs',
|
||||||
'fix_nonzero', 'fix_numliterals',
|
'fix_numliterals',
|
||||||
'fix_operator', 'fix_paren', 'fix_print', 'fix_raise',
|
'fix_print', 'fix_raise',
|
||||||
'fix_reduce', 'fix_renames', 'fix_repr',
|
'fix_reduce', 'fix_renames', 'fix_repr',
|
||||||
'fix_set_literal', 'fix_standarderror', 'fix_sys_exc',
|
'fix_set_literal', 'fix_standarderror', 'fix_sys_exc',
|
||||||
'fix_throw', 'fix_tuple_params', 'fix_types',
|
'fix_throw', 'fix_tuple_params', 'fix_types',
|
||||||
|
|
|
@ -205,8 +205,9 @@ class IrcMsgQueue(object):
|
||||||
msg in self.lowpriority or \
|
msg in self.lowpriority or \
|
||||||
msg in self.highpriority
|
msg in self.highpriority
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
return bool(self.highpriority or self.normal or self.lowpriority)
|
return bool(self.highpriority or self.normal or self.lowpriority)
|
||||||
|
__nonzero__ = __bool__
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self.highpriority)+len(self.lowpriority)+len(self.normal)
|
return len(self.highpriority)+len(self.lowpriority)+len(self.normal)
|
||||||
|
|
|
@ -239,10 +239,11 @@ class IterableMap(object):
|
||||||
ret += 1
|
ret += 1
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
for _ in self.iteritems():
|
for _ in self.iteritems():
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
__nonzero__ = __bool__
|
||||||
|
|
||||||
|
|
||||||
class InsensitivePreservingDict(collections.MutableMapping):
|
class InsensitivePreservingDict(collections.MutableMapping):
|
||||||
|
|
|
@ -76,8 +76,9 @@ class RingBuffer(object):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
return len(self) > 0
|
return len(self) > 0
|
||||||
|
__nonzero__ = __bool__
|
||||||
|
|
||||||
def __contains__(self, elt):
|
def __contains__(self, elt):
|
||||||
return elt in self.L
|
return elt in self.L
|
||||||
|
@ -196,8 +197,9 @@ class queue(object):
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(self.front) + len(self.back)
|
return len(self.front) + len(self.back)
|
||||||
|
|
||||||
def __nonzero__(self):
|
def __bool__(self):
|
||||||
return bool(self.back or self.front)
|
return bool(self.back or self.front)
|
||||||
|
__nonzero__ = __bool__
|
||||||
|
|
||||||
def __contains__(self, elt):
|
def __contains__(self, elt):
|
||||||
return elt in self.front or elt in self.back
|
return elt in self.front or elt in self.back
|
||||||
|
|
Loading…
Reference in New Issue