Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b88e47b

Browse files
committed
removed unused imports
1 parent 77d5275 commit b88e47b

File tree

10 files changed

+6
-31
lines changed

10 files changed

+6
-31
lines changed

perf/gen_perf_cases.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from os.path import *
55
import sys
66
import re
7-
import datetime
87
from glob import glob
98
import operator
109
import shutil
@@ -70,8 +69,6 @@ def gen_test_cases():
7069
i_pat = re.compile(r"<(i)>(.*?)</\1>", re.I)
7170

7271
def _markdown_from_aspn_html(html):
73-
from cgi import escape
74-
7572
markdown = html
7673

7774
markdown = br_eol_pat.sub('\n', markdown) # <br>EOL

perf/perf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import os
1212
import sys
13-
import timeit
1413
import time
1514
from os.path import *
1615
from glob import glob

perf/strip_cookbook_data.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
from os.path import *
3-
from pprint import pprint, pformat
4-
import datetime
3+
from pprint import pformat
54

65
def doit():
76
recipes_path = expanduser("recipes.pprint")
@@ -14,11 +13,10 @@ def doit():
1413
for key in list(c.keys()):
1514
if key not in ('comment', 'title'):
1615
del c[key]
17-
16+
1817
f = open("stripped.pprint", 'w')
1918
f.write(pformat(recipe_dicts))
2019
f.close()
2120

2221

2322
doit()
24-

perf/util.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@
33

44
"""Perf utility functions"""
55

6-
import os
7-
from os.path import basename
86
import sys
9-
import md5
10-
import re
11-
import stat
12-
import textwrap
13-
import types
14-
from pprint import pprint, pformat
157

168

179
# Global dict for holding specific hotshot profilers

test/markdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"""
3030

3131

32-
import re, sys, os, random, codecs
32+
import re, sys, codecs
3333

3434
# Set debug level: 3 none, 2 critical, 1 informative, 0 all
3535
(VERBOSE, INFO, CRITICAL, NONE) = list(range(4))

test/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""The markdown2 test suite entry point."""
66

77
import os
8-
from os.path import exists, join, abspath, dirname, normpath
8+
from os.path import join, abspath, dirname
99
import sys
1010
import logging
1111

@@ -24,7 +24,7 @@ def setup():
2424
# Attempt to get 'pygments' on the import path.
2525
try:
2626
# If already have it, use that one.
27-
import pygments
27+
import pygments # noqa
2828
except ImportError:
2929
pygments_dir = join(top_dir, "deps", "pygments")
3030
if sys.version_info[0] <= 2:
@@ -38,7 +38,7 @@ def setup():
3838
setup()
3939
default_tags = []
4040
try:
41-
import pygments
41+
import pygments # noqa
4242
except ImportError:
4343
log.warning("skipping pygments tests ('pygments' module not found)")
4444
default_tags.append("-pygments")

test/test_markdown2.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
from os.path import join, dirname, abspath, exists, splitext, basename
1010
import re
1111
from glob import glob
12-
from pprint import pprint
1312
import unittest
1413
import codecs
1514
import difflib
1615
import doctest
1716
from json import loads as json_loads
1817

19-
from testlib import TestError, TestSkipped, tag
20-
2118
sys.path.insert(0, join(dirname(dirname(abspath(__file__)))))
2219
try:
2320
import markdown2

test/testlib.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,8 @@
6060
import getopt
6161
import glob
6262
import time
63-
import types
64-
import tempfile
6563
import unittest
66-
from pprint import pprint
6764
import imp
68-
import optparse
6965
import logging
7066
import textwrap
7167
import traceback

tools/tables-align-columns.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
__version__ = "1.0.0"
1414

1515
import codecs
16-
import os
17-
from pprint import pprint, pformat
1816
import re
1917
import sys
2018
from collections import defaultdict

tools/wiki-tables-to-tables.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
__version__ = "1.0.0"
3535

3636
import codecs
37-
import os
38-
from pprint import pprint, pformat
3937
import re
4038
import sys
4139

0 commit comments

Comments
 (0)