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

Adding ruff rule RUF #4235

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Neema-Joju
Copy link

Description

Address part of #4227

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • ruff check . --select RUF (Adding rule RUF checks against ruff specific rules.)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@Neema-Joju Neema-Joju requested a review from a team as a code owner October 22, 2024 16:07
Comment on lines +34 to +37
"A", # flake8-builtins
"B", # flake8-bugbear
"N", # pep8-naming
"RUF", # Ruff-specific rules
Copy link

Choose a reason for hiding this comment

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

I know this is following the pattern above, but can we add the links instead?

Suggested change
"A", # flake8-builtins
"B", # flake8-bugbear
"N", # pep8-naming
"RUF", # Ruff-specific rules
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf

It really makes the review/understanding on the rules while developing faster to just click the link.

That said... Are those rules just running on pre-commit? Or the changes on the files are not applied yet?

In any case... I think all those rules are pedantic. Maybe instead of randomly getting rules from the list, checking some known projects, and which rules they use?

Copy link

Choose a reason for hiding this comment

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

This comment is not necessarily for this PR, it's just about the setup itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants