openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

enable ruff rule: unused-import (F401)

Open RayBB opened this issue 1 year ago • 0 comments

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

  1. Go to ...
  2. 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

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders

RayBB avatar Apr 29 '24 01:04 RayBB