diff options
-rw-r--r-- | markdown/__init__.py | 1 | ||||
-rw-r--r-- | markdown/blockprocessors.py | 2 | ||||
-rw-r--r-- | markdown/extensions/footnotes.py | 2 | ||||
-rw-r--r-- | markdown/extensions/headerid.py | 2 | ||||
-rw-r--r-- | markdown/extensions/smart_strong.py | 1 | ||||
-rw-r--r-- | markdown/inlinepatterns.py | 1 | ||||
-rw-r--r-- | markdown/odict.py | 2 | ||||
-rw-r--r-- | markdown/treeprocessors.py | 1 | ||||
-rw-r--r-- | markdown/util.py | 2 |
9 files changed, 3 insertions, 11 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py index cda6b76..6c6b9eb 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -37,7 +37,6 @@ import re import codecs import sys import logging -import warnings import util from preprocessors import build_preprocessors from blockprocessors import build_block_parser diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py index 7b14a85..1e6160f 100644 --- a/markdown/blockprocessors.py +++ b/markdown/blockprocessors.py @@ -485,7 +485,7 @@ class HRProcessor(BlockProcessor): # Recursively parse lines before hr so they get parsed first. self.parser.parseBlocks(parent, [prelines]) # create hr - hr = util.etree.SubElement(parent, 'hr') + util.etree.SubElement(parent, 'hr') # check for lines in block after hr. postlines = block[self.match.end():].lstrip('\n') if postlines: diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py index cfe41ed..064679b 100644 --- a/markdown/extensions/footnotes.py +++ b/markdown/extensions/footnotes.py @@ -125,7 +125,7 @@ class FootnoteExtension(markdown.Extension): div = etree.Element("div") div.set('class', 'footnote') - hr = etree.SubElement(div, "hr") + etree.SubElement(div, "hr") ol = etree.SubElement(div, "ol") for id in self.footnotes.keys(): diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index e86ab15..2d18c15 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -77,9 +77,7 @@ Dependencies: """ import markdown -from markdown.util import etree import re -from string import ascii_lowercase, digits, punctuation import logging import unicodedata diff --git a/markdown/extensions/smart_strong.py b/markdown/extensions/smart_strong.py index 3ed3560..7166989 100644 --- a/markdown/extensions/smart_strong.py +++ b/markdown/extensions/smart_strong.py @@ -22,7 +22,6 @@ Copyright 2011 ''' -import re import markdown from markdown.inlinepatterns import SimpleTagPattern diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index ab7b4c6..d0f4490 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -45,7 +45,6 @@ import util import odict import re from urlparse import urlparse, urlunparse -import sys # If you see an ImportError for htmlentitydefs after using 2to3 to convert for # use by Python3, then you are probably using the buggy version from Python 3.0. # We recomend using the tool from Python 3.1 even if you will be running the diff --git a/markdown/odict.py b/markdown/odict.py index d77d701..02864bf 100644 --- a/markdown/odict.py +++ b/markdown/odict.py @@ -119,7 +119,7 @@ class OrderedDict(dict): """ Return the index of a given key. """ try: return self.keyOrder.index(key) - except ValueError, e: + except ValueError: raise ValueError("Element '%s' was not found in OrderedDict" % key) def index_for_location(self, location): diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index 841fe0a..fb107d2 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -1,4 +1,3 @@ -import re import inlinepatterns import util import odict diff --git a/markdown/util.py b/markdown/util.py index db45a5e..12dcbd5 100644 --- a/markdown/util.py +++ b/markdown/util.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- import re -from logging import CRITICAL - import etree_loader |