rename variables in get_all_imports?
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
`files` is parsed and processed to get the list of imported packages, but this list will be contaminated by stdlib packages and local imports which will be removed in other processing steps (lines 165 and 171).
The `candidates` list is simply a list of local files that could be imported (like an utils.py file) but shouldnt be a part of the requirements file.
If my description is correct, candidates is an awful name. What are they candidates of? also, this would explain why we are adding dir by dir to the list, as I raised in issue #424.
Maybe we should rename those objects to something more intuitive.
maybe
py_files -> local_files
candidates -> local_modules
(pretty sure thats the correct nomenclature but we could use a double check)
Contributor guide
Research direction
Start by reading get_all_imports around lines 165 and 171, then trace how files and candidates are populated and referenced. Confirm whether they represent local files and local modules, rename them consistently, and verify that requirements generation remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100