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()
|
ast = parser.parse_xref_object()
|
||||||
parser.assert_end()
|
parser.assert_end()
|
||||||
except DefinitionError as e:
|
except DefinitionError as e:
|
||||||
def findWarning():
|
def findWarning(e): # as arg to stop flake8 from complaining
|
||||||
if typ != 'any' and typ != 'func':
|
if typ != 'any' and typ != 'func':
|
||||||
return target, e
|
return target, e
|
||||||
# hax on top of the paren hax to try to get correct errors
|
# hax on top of the paren hax to try to get correct errors
|
||||||
@ -4511,7 +4511,7 @@ class CPPDomain(Domain):
|
|||||||
return target[:-2], e2
|
return target[:-2], e2
|
||||||
# strange, that we don't get the error now, use the original
|
# strange, that we don't get the error now, use the original
|
||||||
return target, e
|
return target, e
|
||||||
t, ex = findWarning()
|
t, ex = findWarning(e)
|
||||||
warner.warn('Unparseable C++ cross-reference: %r\n%s'
|
warner.warn('Unparseable C++ cross-reference: %r\n%s'
|
||||||
% (t, text_type(ex.description)))
|
% (t, text_type(ex.description)))
|
||||||
return None, None
|
return None, None
|
||||||
|
Loading…
Reference in New Issue
Block a user