mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Make flake8 stop complaining.
This commit is contained in:
parent
bc527c533e
commit
38b38d8aff
@ -4499,7 +4499,7 @@ class CPPDomain(Domain):
|
||||
ast = parser.parse_xref_object()
|
||||
parser.assert_end()
|
||||
except DefinitionError as e:
|
||||
def findWarning():
|
||||
def findWarning(e): # as arg to stop flake8 from complaining
|
||||
if typ != 'any' and typ != 'func':
|
||||
return target, e
|
||||
# hax on top of the paren hax to try to get correct errors
|
||||
@ -4511,7 +4511,7 @@ class CPPDomain(Domain):
|
||||
return target[:-2], e2
|
||||
# strange, that we don't get the error now, use the original
|
||||
return target, e
|
||||
t, ex = findWarning()
|
||||
t, ex = findWarning(e)
|
||||
warner.warn('Unparseable C++ cross-reference: %r\n%s'
|
||||
% (t, text_type(ex.description)))
|
||||
return None, None
|
||||
|
Loading…
Reference in New Issue
Block a user