summaryrefslogtreecommitdiff
path: root/creole/rest_tools/pypi_rest2html.py
diff options
context:
space:
mode:
Diffstat (limited to 'creole/rest_tools/pypi_rest2html.py')
-rw-r--r--creole/rest_tools/pypi_rest2html.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/creole/rest_tools/pypi_rest2html.py b/creole/rest_tools/pypi_rest2html.py
index 4f86640..b264514 100644
--- a/creole/rest_tools/pypi_rest2html.py
+++ b/creole/rest_tools/pypi_rest2html.py
@@ -12,21 +12,15 @@
"""
-try:
- # Python 3
- from urllib.parse import urlparse
-except ImportError:
- # Python 2
- from urlparse import urlparse
+from urllib.parse import urlparse
from creole.exceptions import DocutilsImportError
try:
- import docutils
+ import docutils # noqa flake8
from docutils import io, readers
from docutils.core import publish_doctree, Publisher
- from docutils.writers import get_writer_class
- from docutils.transforms import TransformError, Transform
+ from docutils.transforms import TransformError
except ImportError as err:
msg = (
"%s - You can't use rest2html!"