Why are non-.py files ignored?
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
The Unix philosphy is to hide interpreter choice inside an executable file (ie magic or #!). It needn't have a file extension. If you do this, you can swap implementations say, between sh and py and C and not change the user's view.
So if you have a directory containing a perfectly cromulent py program,
```
#!/usr/bin/python
import requests
print requests.get("http://ifconfig.co/ip").text
```
pipreqs will not find requests. Is this intentional? Why not have a "--examine-all" switch or make such the default?
Contributor guide
Research direction
Start by tracing pipreqs' file-discovery path to see how it filters files by extension. Compare that behavior with the extensionless executable Python example in the issue, then determine whether support should be an option or the default. Done means the chosen behavior is implemented and covered for executable files without a .py extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100