This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
Crash with simple f-string #640
Open
Description
openedon Apr 24, 2023
Pydocstyle crashes with the below code:
Code: f"bar {123}"
Traceback:
File "venv/bin/pydocstyle", line 8, in <module>
sys.exit(main())
File "venv/lib/python3.7/site-packages/pydocstyle/cli.py", line 79, in main
sys.exit(run_pydocstyle())
File "venv/lib/python3.7/site-packages/pydocstyle/cli.py", line 54, in run_pydocstyle
ignore_self_only_init=ignore_self_only_init,
File "venv/lib/python3.7/site-packages/pydocstyle/checker.py", line 1171, in check
ignore_self_only_init,
File "venv/lib/python3.7/site-packages/pydocstyle/checker.py", line 159, in check_source
self, definition, definition.docstring
File "venv/lib/python3.7/site-packages/pydocstyle/checker.py", line 244, in check_docstring_empty
if docstring and is_blank(ast.literal_eval(docstring)):
File "/root/.pyenv/versions/3.7.2/lib/python3.7/ast.py", line 91, in literal_eval
return _convert(node_or_string)
File "/root/.pyenv/versions/3.7.2/lib/python3.7/ast.py", line 90, in _convert
return _convert_signed_num(node)
File "/root/.pyenv/versions/3.7.2/lib/python3.7/ast.py", line 63, in _convert_signed_num
return _convert_num(node)
File "/root/.pyenv/versions/3.7.2/lib/python3.7/ast.py", line 55, in _convert_num
raise ValueError('malformed node or string: ' + repr(node))
ValueError: malformed node or string: <_ast.JoinedStr object at 0x7f296ff35a20>
Python 3.7.2
Pydocstyle: 6.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels