mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use a string with warning in handle_signature
Previously it would pass in the exception object itself, which then might crash filters that are using `record.msg.startswith` etc. The warning was triggered for me with `sig = foo: int = -1`, where it appears to not handle negative numbers (have not investigated).
This commit is contained in:
parent
2bec3f8cbd
commit
58b39918fd
@ -334,7 +334,7 @@ class PyObject(ObjectDescription):
|
||||
# it supports to represent optional arguments (ex. "func(foo [, bar])")
|
||||
_pseudo_parse_arglist(signode, arglist)
|
||||
except NotImplementedError as exc:
|
||||
logger.warning(exc)
|
||||
logger.warning("could not parse arglist (%r): %s", arglist, exc)
|
||||
_pseudo_parse_arglist(signode, arglist)
|
||||
else:
|
||||
if self.needs_arglist():
|
||||
|
Loading…
Reference in New Issue
Block a user