From c59ce15cf6aaa772f74c4c040392c2d838f5bb2e Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Mon, 5 Nov 2012 15:00:17 +0400 Subject: docs/change_log.txt: add a missing `[` --- docs/change_log.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/change_log.txt b/docs/change_log.txt index 30cb771..1a078bf 100644 --- a/docs/change_log.txt +++ b/docs/change_log.txt @@ -9,7 +9,7 @@ Python-Markdown Changelog Nov 4, 2012: Released version 2.2.1 ([Notes](release-2.2.1.html)). -Jul 5, 2012: Released version 2.2.0 (Notes](release-2.2.0.html)). +Jul 5, 2012: Released version 2.2.0 ([Notes](release-2.2.0.html)). Jan 22, 2012: Released version 2.1.1 ([Notes](release-2.1.1.html)). -- cgit v1.2.3 From 1b4172ca6c8b3ef4931aaae15704b8f59325f322 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Fri, 9 Nov 2012 10:37:06 +0400 Subject: Fix all pyflakes unused-import/unused-variable warnings --- markdown/__init__.py | 1 - markdown/blockprocessors.py | 2 +- markdown/extensions/footnotes.py | 2 +- markdown/extensions/headerid.py | 2 -- markdown/extensions/smart_strong.py | 1 - markdown/inlinepatterns.py | 1 - markdown/odict.py | 2 +- markdown/treeprocessors.py | 1 - 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 -- cgit v1.2.3