(Even empty) subfolders hide valid imports
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
A `numpy` subfolder in the project hides the `numpy` pypi package from `requirements.txt`, even if empty and non-functional.
Repro steps
-
```
mkdir temp
cd temp
echo import matplotlib > bug.py
echo import numpy >> bug.py
echo "print(numpy.__version__)" >> bug.py
py bug.py
pipreqs --print
mkdir numpy
py bug.py
pipreqs --print
```
Expected (after the second run)
-
```
matplotlib=...
numpy=...
```
Actual
-
```
matplotlib=...
```
Contributor guide
Research direction
Start by reproducing the issue in a temporary project with bug.py, the empty numpy folder, and the shown pipreqs --print commands. Trace how pipreqs resolves imports when scanning the project; done means the output still includes both matplotlib and numpy after the local empty folder is created.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100