Skip to content

Autofix ruf010 #56914

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

Merged
merged 4 commits into from
Jan 16, 2024
Merged

Autofix ruf010 #56914

merged 4 commits into from
Jan 16, 2024

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Jan 16, 2024

As now ruff has an autofix for RUF010, I enable the rule.

I separate the PR into 4 commits with the 4 actions I performed, you can review them one by one for a better diff.

  • Autofix RUF010

  • ruff format

  • Final manual format

  • Remove old "unwanted pattern" rule in pre-commit

  • closes #xxxx (Replace xxxx with the GitHub issue number)

  • Tests added and passed if fixing a bug or adding a new feature

  • All code checks passed.

  • Added type annotations to new arguments/methods/functions.

  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@tqa236
Copy link
Contributor Author

tqa236 commented Jan 16, 2024

Is this rule conflicted with pandas style guide? If that's the case, we can move it to "Intentionally disabled" rather than "TODO: Enable gradually"

@mroeschke
Copy link
Member

I would be okay enabling RUF010 and having it apply everywhere

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Jan 16, 2024
@tqa236
Copy link
Contributor Author

tqa236 commented Jan 16, 2024

@mroeschke Thanks, I removed the old rule in the last commit. pre-commit is green again now.

@mroeschke mroeschke added this to the 3.0 milestone Jan 16, 2024
@mroeschke mroeschke merged commit 0dade0b into pandas-dev:main Jan 16, 2024
@mroeschke
Copy link
Member

Thanks @tqa236

@tqa236 tqa236 deleted the autofix-ruf010 branch January 22, 2024 18:21
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* STY: Autofix RUF010

* STY: Apply ruff format after autofix

* STY: Final manual fix

* STY: Remove old repl rule in pre-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants