From 412bb9aae87dccfb81e8dc0e0cfaff40ad0c3701 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 12 Jan 2017 10:09:44 +0900 Subject: [PATCH] Fix flake8 violations --- setup.cfg | 2 +- sphinx/__init__.py | 2 +- sphinx/apidoc.py | 4 ++-- sphinx/builders/linkcheck.py | 4 ++-- sphinx/util/docutils.py | 2 +- sphinx/util/jsdump.py | 4 ++-- sphinx/util/osutil.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/setup.cfg b/setup.cfg index a833a1323..f0f7c7325 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,5 +25,5 @@ universal = 1 [flake8] max-line-length = 95 -ignore = E113,E116,E221,E241,E251,E901 +ignore = E113,E116,E241,E251,E901 exclude = .git,.tox,tests/*,build/*,sphinx/search/*,sphinx/pycode/pgen2/*,doc/ext/example*.py diff --git a/sphinx/__init__.py b/sphinx/__init__.py index e5768dcbe..2cd3a57de 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -30,7 +30,7 @@ if 'PYTHONWARNINGS' not in os.environ: warnings.filterwarnings('ignore', "'U' mode is deprecated", DeprecationWarning, module='docutils.io') -__version__ = '1.5.2+' +__version__ = '1.5.2+' __released__ = '1.5.2' # used when Sphinx builds its own docs # version info for better programmatic use diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index d4793ff4d..19a711370 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -368,8 +368,8 @@ Note: By default this script will not overwrite already created files.""") text += ' %s\n' % module d = dict( path = opts.destdir, - sep = False, - dot = '_', + sep = False, + dot = '_', project = opts.header, author = opts.author or 'Author', version = opts.version or '', diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 3ca13d023..3ca00a3a2 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -225,7 +225,7 @@ class CheckExternalLinksBuilder(Builder): self.info(darkgray('-local- ') + uri) self.write_entry('local', docname, lineno, uri) elif status == 'working': - self.info(darkgreen('ok ') + uri + info) + self.info(darkgreen('ok ') + uri + info) elif status == 'broken': self.write_entry('broken', docname, lineno, uri + ': ' + info) if self.app.quiet or self.app.warningiserror: @@ -243,7 +243,7 @@ class CheckExternalLinksBuilder(Builder): }[code] self.write_entry('redirected ' + text, docname, lineno, uri + ' to ' + info) - self.info(color('redirect ') + uri + color(' - ' + text + ' to ' + info)) + self.info(color('redirect ') + uri + color(' - ' + text + ' to ' + info)) def get_target_uri(self, docname, typ=None): return '' diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 8d1d58cf8..ecc03f066 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -16,7 +16,7 @@ import docutils from docutils.parsers.rst import directives, roles -__version_info__ = tuple(map(int, docutils.__version__.split('.'))) +__version_info__ = tuple(map(int, docutils.__version__.split('.'))) @contextmanager diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index 5a2148c5b..1dcb78946 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -16,8 +16,8 @@ from six import iteritems, integer_types, string_types from sphinx.util.pycompat import u -_str_re = re.compile(r'"(\\\\|\\"|[^"])*"') -_int_re = re.compile(r'\d+') +_str_re = re.compile(r'"(\\\\|\\"|[^"])*"') +_int_re = re.compile(r'\d+') _name_re = re.compile(r'[a-zA-Z_]\w*') _nameonly_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$') diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 86e6c515b..6368384e8 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -27,7 +27,7 @@ from six import PY2, text_type # Errnos that we need. EEXIST = getattr(errno, 'EEXIST', 0) ENOENT = getattr(errno, 'ENOENT', 0) -EPIPE = getattr(errno, 'EPIPE', 0) +EPIPE = getattr(errno, 'EPIPE', 0) EINVAL = getattr(errno, 'EINVAL', 0) # SEP separates path elements in the canonical file names