pep8 fixes, modernizations

autopep8 -a -r -i --select E711,E712,W601,W602,W603,W604,W690,E304,E401,E502 .
Also includes some manual reindentations (many are left after the print()
changes).
Manually checked, some modernizations not commited here.
This commit is contained in:
Laurent Bachelier 2014-10-10 22:10:41 +02:00
commit 6161a0aacd
18 changed files with 57 additions and 51 deletions

View file

@ -207,7 +207,7 @@ class _ItemElementMeta(type):
filters = [(re.sub('^obj_', '', attr_name), attrs[attr_name]) for attr_name, obj in attrs.items() if attr_name.startswith('obj_')]
# constants first, then filters, then methods
filters.sort(key=lambda x: x[1]._creation_counter if hasattr(x[1], '_creation_counter') else (sys.maxint if callable(x[1]) else 0))
filters.sort(key=lambda x: x[1]._creation_counter if hasattr(x[1], '_creation_counter') else (sys.maxsize if callable(x[1]) else 0))
new_class = super(_ItemElementMeta, mcs).__new__(mcs, name, bases, attrs)
new_class._attrs = _attrs + [f[0] for f in filters]