diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-06-18 20:31:05 +0300 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2014-06-18 20:31:05 +0300 |
commit | 8e3f9d3253d1d0fb820dad4249d5110d017595c1 (patch) | |
tree | 04cb00f66a8e3a6b41031d7dfb39c598ce4aa06d /setuptools/command/upload_docs.py | |
parent | afea314acbcd6db19dcc96d84fa9652f71b883fb (diff) | |
download | external_python_setuptools-8e3f9d3253d1d0fb820dad4249d5110d017595c1.tar.gz external_python_setuptools-8e3f9d3253d1d0fb820dad4249d5110d017595c1.tar.bz2 external_python_setuptools-8e3f9d3253d1d0fb820dad4249d5110d017595c1.zip |
Fixed PEP 8 compliancy of the setuptools.command package
Diffstat (limited to 'setuptools/command/upload_docs.py')
-rw-r--r-- | setuptools/command/upload_docs.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index cad7a52d..cd6c300c 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -5,6 +5,10 @@ Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ +from base64 import standard_b64encode +from distutils import log +from distutils.errors import DistutilsOptionError +from distutils.command.upload import upload import os import socket import zipfile @@ -12,14 +16,9 @@ import tempfile import sys import shutil -from base64 import standard_b64encode +from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 from pkg_resources import iter_entry_points -from distutils import log -from distutils.errors import DistutilsOptionError -from distutils.command.upload import upload - -from setuptools.compat import httplib, urlparse, unicode, iteritems, PY3 errors = 'surrogateescape' if PY3 else 'strict' @@ -33,7 +32,6 @@ def b(s, encoding='utf-8'): class upload_docs(upload): - description = 'Upload documentation to PyPI' user_options = [ @@ -42,7 +40,7 @@ class upload_docs(upload): ('show-response', None, 'display full response text from server'), ('upload-dir=', None, 'directory to upload'), - ] + ] boolean_options = upload.boolean_options def has_sphinx(self): @@ -159,7 +157,7 @@ class upload_docs(upload): elif schema == 'https': conn = httplib.HTTPSConnection(netloc) else: - raise AssertionError("unsupported schema "+schema) + raise AssertionError("unsupported schema " + schema) data = '' try: @@ -190,4 +188,4 @@ class upload_docs(upload): self.announce('Upload failed (%s): %s' % (r.status, r.reason), log.ERROR) if self.show_response: - print('-'*75, r.read(), '-'*75) + print('-' * 75, r.read(), '-' * 75) |