mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix flake8 violations
This commit is contained in:
parent
60d4846e0f
commit
412bb9aae8
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 '',
|
||||
|
@ -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 ''
|
||||
|
@ -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
|
||||
|
@ -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_]*$')
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user