Skip to content

Commit

Permalink
Fixed PEP8 style errors using autopep8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Katz committed Jun 9, 2013
1 parent 516273c commit 57c51c1
Show file tree
Hide file tree
Showing 93 changed files with 514 additions and 175 deletions.
2 changes: 1 addition & 1 deletion nose2/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

if __name__ == '__main__':
from nose2 import discover
discover()
discover()
16 changes: 10 additions & 6 deletions nose2/backports/ordereddict.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## {{{ http://code.activestate.com/recipes/576693/ (r9)
# {{{ http://code.activestate.com/recipes/576693/ (r9)
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.

Expand All @@ -14,11 +14,13 @@


class OrderedDict(dict):

'Dictionary that remembers insertion order'
# An inherited dict maps keys to values.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
# Big-O running times for all methods are the same as for regular dictionaries.
# Big-O running times for all methods are the same as for regular
# dictionaries.

# The internal self.__map dictionary maps keys to links in a doubly linked list.
# The circular doubly linked list starts and ends with a sentinel element.
Expand All @@ -44,7 +46,8 @@ def __init__(self, *args, **kwds):
def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
'od.__setitem__(i, y) <==> od[i]=y'
# Setting a new item creates a new link which goes at the end of the linked
# list, and the inherited dictionary is updated with the new key/value pair.
# list, and the inherited dictionary is updated with the new key/value
# pair.
if key not in self:
root = self.__root
last = root[0]
Expand All @@ -54,7 +57,8 @@ def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
def __delitem__(self, key, dict_delitem=dict.__delitem__):
'od.__delitem__(y) <==> del od[y]'
# Deleting an existing item uses self.__map to find the link which is
# then removed by updating the links in the predecessor and successor nodes.
# then removed by updating the links in the predecessor and successor
# nodes.
dict_delitem(self, key)
link_prev, link_next, key = self.__map.pop(key)
link_prev[1] = link_next
Expand Down Expand Up @@ -238,7 +242,7 @@ def __eq__(self, other):
'''
if isinstance(other, OrderedDict):
return len(self)==len(other) and self.items() == other.items()
return len(self) == len(other) and self.items() == other.items()
return dict.__eq__(self, other)

def __ne__(self, other):
Expand All @@ -257,4 +261,4 @@ def viewvalues(self):
def viewitems(self):
"od.viewitems() -> a set-like object providing a view on od's items"
return ItemsView(self)
## end of http://code.activestate.com/recipes/576693/ }}}
# end of http://code.activestate.com/recipes/576693/ }}}
1 change: 1 addition & 0 deletions nose2/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

def collector():
class Test(unittest.TestCase):

def run(self, result_):
ok = self._collector(result_)
sys.exit(not ok)
Expand Down
3 changes: 2 additions & 1 deletion nose2/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
try:
unittest.installHandler
except AttributeError:
raise ImportError("Built-in unittest version too old, unittest2 is required")
raise ImportError(
"Built-in unittest version too old, unittest2 is required")

__unittest = True

Expand Down
2 changes: 2 additions & 0 deletions nose2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@


class Config(object):

"""Configuration for a plugin or other entities.
Encapsulates configuration for a single plugin or other element.
Corresponds to a :class:`ConfigParser.Section` but provides an
extended interface for extracting items as a certain type.
"""

def __init__(self, items):
self._items = items
self._mvd = {}
Expand Down
Loading

0 comments on commit 57c51c1

Please sign in to comment.