Allow line breaks before binary operators

This commit is contained in:
Adam Turner 2022-12-29 15:54:16 +00:00
parent 6016b4d634
commit f852661243
3 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ ignore =
E241,
E251,
E741,
W503,
W504,
I101,
B006,

View File

@ -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

View File

@ -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: