Filter import additions to files by regex/glob
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7k
- Forks
- 687
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 2
Description
Hi, I'm facing a common use case when I've typings for a package but not for the tests, so I would like to add from __future__ import annotations only for the package that resides under src/ but keep the tests/ without that import.
The current solution is to run isort for the package with --add-import from __future__ import annotations and run again separately for tests without that option.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing --add-import command option and how it selects files under src/ and tests/. Define how a regex or glob filter should be supplied and applied, then verify that the future import is added only to matching package files while tests remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100