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:
Daniel Hahler 2020-03-05 01:13:43 +01:00
parent 2bec3f8cbd
commit 58b39918fd

View File

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