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 PLR5501 - Convert nested if statements to elif clauses for better readability #10260

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

ananyakaligal
Copy link
Contributor

@ananyakaligal ananyakaligal commented Jan 3, 2025

Part of #10196

Changed made automatically by ruff (only using safe mode, not --unsafe)

This pull request addresses PLR5501 by simplifying conditional statements across the codebase. Specifically, it replaces instances of else followed by if with elif, enhancing both readability and structure.

Technical Details

  • Complies with Ruff's PLR5501 rule.
  • Enhances code clarity by reducing unnecessary nesting in conditionals.
  • Refactored relevant sections to follow best practices.

Testing
Linting has been successfully completed with no errors (PLR5501 resolved).

Screenshot
image

Stakeholders
@RayBB

Let me know if you need any further adjustments!

Copy link
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Looks good to me.
Now we just need staff to review / merge 👍

@RayBB RayBB added the Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. label Jan 3, 2025
@RayBB RayBB changed the title Removed PLR5501 Enable PLR5501 - Convert nested if statements to elif clauses for better readability Jan 3, 2025
@mekarpeles mekarpeles merged commit e8215dc into internetarchive:master Jan 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Developers Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants