isort icon indicating copy to clipboard operation
isort copied to clipboard

Filter import additions to files by regex/glob

Open mondeja opened this issue 1 year ago • 0 comments

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.

mondeja avatar Jul 08 '22 09:07 mondeja