mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix lint errors
This commit is contained in:
parent
3599f7d844
commit
d20cb96773
@ -496,10 +496,12 @@ class PyObject(ObjectDescription[Tuple[str, str]]):
|
|||||||
sig_prefix = self.get_signature_prefix(sig)
|
sig_prefix = self.get_signature_prefix(sig)
|
||||||
if sig_prefix:
|
if sig_prefix:
|
||||||
if type(sig_prefix) is str:
|
if type(sig_prefix) is str:
|
||||||
logger.warning("Python directive get_signature_prefix() returns a str ('{}')"
|
logger.warning(
|
||||||
" instead of a list of nodes (changed in 4.3).".format(sig_prefix),
|
"Python directive get_signature_prefix() returns a str ('{}')"
|
||||||
location=signode)
|
" instead of a list of nodes (changed in 4.3).".format(sig_prefix),
|
||||||
signode += addnodes.desc_annotation(sig_prefix, '', nodes.Text(sig_prefix, sig_prefix))
|
location=signode)
|
||||||
|
signode += addnodes.desc_annotation(sig_prefix, '', # type: ignore
|
||||||
|
nodes.Text(sig_prefix)) # type: ignore
|
||||||
else:
|
else:
|
||||||
signode += addnodes.desc_annotation(str(sig_prefix), '', *sig_prefix)
|
signode += addnodes.desc_annotation(str(sig_prefix), '', *sig_prefix)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user