You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I just thought about the case where the user could have added print statements that are executed at import time. In that case pytkdocs JSON output would be broken/corrupted.
To Reproduce
$ echo -e '"""Module docstring."""\n\nprint("finished loading")\n'> corrupt.py
$ echo'{"objects": [{"path": "corrupt"}]}'| poetry run pytkdocs | jqparse error: Invalid literal at line 1, column 9
Expected behavior
The output of the imported code should be discarded.
System (please complete the following information):
The text was updated successfully, but these errors were encountered:
pawamoy
changed the title
Would "print" statements in the loaded code break the output?
print statements in the loaded code break the output
Apr 25, 2020
Describe the bug
I just thought about the case where the user could have added
print
statements that are executed at import time. In that casepytkdocs
JSON output would be broken/corrupted.To Reproduce
Expected behavior
The output of the imported code should be discarded.
System (please complete the following information):
pytkdocs
version 0.3.0Additional context
Possibly related to rdilweb/docs@cc20660 and mkdocstrings/mkdocstrings#91
The text was updated successfully, but these errors were encountered: