aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/odict.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-11-20 16:07:03 -0500
committerWaylan Limberg <waylan.limberg@icloud.com>2014-11-20 16:07:03 -0500
commit8f66a94eab1389d97041944ed24afd2bf7c4389c (patch)
tree10b53664076650be951468cbbb163f3d637e5891 /markdown/odict.py
parent0c2143819ef7de53be52f7a4d47e027ff194a9b4 (diff)
downloadmarkdown-8f66a94eab1389d97041944ed24afd2bf7c4389c.tar.gz
markdown-8f66a94eab1389d97041944ed24afd2bf7c4389c.tar.bz2
markdown-8f66a94eab1389d97041944ed24afd2bf7c4389c.zip
Flake8 cleanup (mostly whitespace).
Got all but a couple files in the tests (ran out of time today). Apparently I have been using some bad form for years (although a few things seemed to look better before the update). Anyway, conformant now.
Diffstat (limited to 'markdown/odict.py')
-rw-r--r--markdown/odict.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/markdown/odict.py b/markdown/odict.py
index b158e06..584ad7c 100644
--- a/markdown/odict.py
+++ b/markdown/odict.py
@@ -1,13 +1,13 @@
from __future__ import unicode_literals
from __future__ import absolute_import
from . import util
-
from copy import deepcopy
+
class OrderedDict(dict):
"""
A dictionary that keeps its keys in the order in which they're inserted.
-
+
Copied from Django's SortedDict with some modifications.
"""
@@ -82,11 +82,11 @@ class OrderedDict(dict):
for key in self.keyOrder:
yield self[key]
- if util.PY3: #pragma: no cover
+ if util.PY3: # pragma: no cover
items = _iteritems
keys = _iterkeys
values = _itervalues
- else: #pragma: no cover
+ else: # pragma: no cover
iteritems = _iteritems
iterkeys = _iterkeys
itervalues = _itervalues
@@ -133,7 +133,9 @@ class OrderedDict(dict):
Replaces the normal dict.__repr__ with a version that returns the keys
in their Ordered order.
"""
- return '{%s}' % ', '.join(['%r: %r' % (k, v) for k, v in self._iteritems()])
+ return '{%s}' % ', '.join(
+ ['%r: %r' % (k, v) for k, v in self._iteritems()]
+ )
def clear(self):
super(OrderedDict, self).clear()