interrogate
interrogate copied to clipboard
-o, --output flag doesn't create output directory for log file if it doesn't exist already
Environment
interrogateversion(s): 1.5.0- Python version(s): 3.6-3.9
Description of the bug
When using the -o, --output flag, interrogate doesn't create the parent(s) of the file if they don't already exist:
$interrogate -vv -o build/coverage/docstring_coverage.log dir/
<traceback>
FileNotFoundError: [Errno 2] No such file or directory: 'build/coverage/docstring_coverage.log'
What you expected to happen
I would expect that interrogate would create the parent directories that do not exist (e.g. in this case build/coverage/.