Make F401 "unused import" suppressions more specific · gitpython-developers/GitPython@6318eea · GitHub
Skip to content

Commit 6318eea

Browse files
committed
Make F401 "unused import" suppressions more specific
In git.compat and git.util. This applies them individually to each name that is known to be an unused import, rather than to entire import statements (except where the entire statement fit on one line and everything it imported is known to be unused). Either Ruff has the ability to accept this more granular style of suppression, or I had been unaware of it from flake8 (used before). I have veriifed that the suppressions are not superfluous: with no suppressions, Ruff does warn. This commit makes no change in git.types because it looks like no suppression at all may be needed there anymore; that will be covered in the next commit. This also removes the old `@UnusedImport` comments, which had been kept before because they were more granular; this specificity is now achieved by comments the tools being used can recognize.
1 parent 3d4e476 commit 6318eea

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

git/compat.py

Lines changed: 7 additions & 7 deletions

git/util.py

Lines changed: 9 additions & 9 deletions

0 commit comments

Comments
 (0)