econchick / econchick/interrogate
Refuses to scan executable python scripts that don't end in .py
- Dominant language
- Python
- Stars
- 676
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
### Description of the bug
In the code there's an automatic error if `if not path.endswith(".py")` but python executables usually lack the file extension.
### What you expected to happen
Scan the python file.
### How to reproduce (as minimally and precisely as possible)
Make a python file with a #! line, but no .py in the filename.
### Anthing else we need to know?
As an example, we're trying to use interrogate with a project that has a couple of python scripts within the repo in a bin directory, and none of them end in .py.
```
❯ interrogate bin/postgres-ready
E: Invalid file '[...]/bin/postgres-ready'. Unable interrogate non-Python files.
❯ identify-cli bin/postgres-ready # from pre-commit
["executable", "file", "python", "text"]
❯ file bin/postgres-ready
bin/postgres-ready: Python script text executable, ASCII text
❯ head -1 bin/postgres-ready
#!/usr/bin/env python
```
Contributor guide
Assessment
This issue has not been assessed yet.