errors=r.SET_NULL/r.IGNORE options for parsedate/parsedatetime, closes #416

This commit is contained in:
Simon Willison 2022-03-20 21:01:35 -07:00
commit 878d5f5cea
6 changed files with 108 additions and 20 deletions

View file

@ -2583,12 +2583,16 @@ def _generate_convert_help():
"""
).strip()
recipe_names = [
n for n in dir(recipes) if not n.startswith("_") and n not in ("json", "parser")
n
for n in dir(recipes)
if not n.startswith("_")
and n not in ("json", "parser")
and callable(getattr(recipes, n))
]
for name in recipe_names:
fn = getattr(recipes, name)
help += "\n\nr.{}{}\n\n {}".format(
name, str(inspect.signature(fn)), fn.__doc__
help += "\n\nr.{}{}\n\n\b{}".format(
name, str(inspect.signature(fn)), fn.__doc__.rstrip()
)
help += "\n\n"
help += textwrap.dedent(