econchick / econchick/interrogate
-o, --output flag doesn't create output directory for log file if it doesn't exist already
Open
bug
needs triage
- Dominant language
- Python
- Stars
- 676
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
### Environment
- `interrogate` version(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:
``` bash
$interrogate -vv -o build/coverage/docstring_coverage.log dir/
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/`.
Contributor guide
Assessment
This issue has not been assessed yet.