openlibrary
openlibrary copied to clipboard
enable ruff rule: unused-import (F401)
PR here: #9182
Problem
I noticed we have quite a few instances of unused imports in our python code. Perhaps some have side effects but many do not appear to have any side effects.
I think it would be good hygiene for our codebase to enable ruff to unused imports and disable it per line as needed.
Evidence / Screenshot
Relevant URL(s)
https://docs.astral.sh/ruff/rules/unused-import/
Reproducing the bug
- Go to ...
- Do ...
- Expected behavior:
- Actual behavior:
Context
- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N): Y
- Environment (prod, dev, local): prod