diff --git a/.flake8 b/.flake8 index 3c3eb678d..474181f8b 100644 --- a/.flake8 +++ b/.flake8 @@ -5,6 +5,7 @@ ignore = E241, E251, E741, + W503, W504, I101, B006, diff --git a/sphinx/environment/collectors/toctree.py b/sphinx/environment/collectors/toctree.py index 74af40928..ec43a1f8e 100644 --- a/sphinx/environment/collectors/toctree.py +++ b/sphinx/environment/collectors/toctree.py @@ -252,7 +252,7 @@ class TocTreeCollector(EnvironmentCollector): for domain in env.domains.values(): figtype = domain.get_enumerable_node_type(node) if (domain.name == 'std' - and not domain.get_numfig_title(node)): # type: ignore[attr-defined] # NoQA: E501,W503 + and not domain.get_numfig_title(node)): # type: ignore[attr-defined] # NoQA: E501 # Skip if uncaptioned node continue diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 7bdde2166..f6570239c 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1765,8 +1765,8 @@ class LaTeXTranslator(SphinxTranslator): hlcode = self.highlighter.highlight_block( node.astext(), lang, opts=opts, location=node, nowrap=True) self.body.append(r'\sphinxcode{\sphinxupquote{%' + CR - + hlcode.rstrip() + '%' + CR # NoQA: W503 - + '}}') # NoQA: W503 + + hlcode.rstrip() + '%' + CR + + '}}') raise nodes.SkipNode def depart_literal(self, node: Element) -> None: