Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable ruff rule: unused-import (F401) #9181

Open
RayBB opened this issue Apr 29, 2024 · 1 comment · Fixed by #9182
Open

enable ruff rule: unused-import (F401) #9181

RayBB opened this issue Apr 29, 2024 · 1 comment · Fixed by #9182
Labels
Affects: Developers Lead: @scottbarnes Issues overseen by Scott (Community Imports) Priority: 3 Issues that we can consider at our leisure. [managed]

Comments

@RayBB
Copy link
Collaborator

RayBB commented Apr 29, 2024

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 RayBB added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Apr 29, 2024
@RayBB RayBB changed the title enable ruff unused-import (F401) rule enable ruff rule: unused-import (F401) Apr 29, 2024
@mekarpeles mekarpeles added Lead: @scottbarnes Issues overseen by Scott (Community Imports) and removed Needs: Lead labels Apr 29, 2024
@scottbarnes scottbarnes added Priority: 3 Issues that we can consider at our leisure. [managed] Affects: Developers and removed Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels May 6, 2024
@RayBB
Copy link
Collaborator Author

RayBB commented May 23, 2024

Reopening because it was reverted due to issues in prod

For next steps see:
https://internetarchive.slack.com/archives/C0ETZV72L/p1716478795219189?thread_ts=1716477305.298609&cid=C0ETZV72L

@RayBB RayBB reopened this May 23, 2024
@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 24, 2024
@scottbarnes scottbarnes removed the Needs: Response Issues which require feedback from lead label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Developers Lead: @scottbarnes Issues overseen by Scott (Community Imports) Priority: 3 Issues that we can consider at our leisure. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants