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

Bump ruff to latest version #57766

Merged
merged 4 commits into from Mar 7, 2024
Merged

Bump ruff to latest version #57766

merged 4 commits into from Mar 7, 2024

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Mar 7, 2024

Bump ruff to the latest version in a separate PR because of the big formatting change.

@tqa236
Copy link
Contributor Author

tqa236 commented Mar 7, 2024

@mroeschke I wonder if it's reasonable to deprecate EX03 in favor of ruff's autoformat of docstrings.

If I understand correctly, EX03 is used to validate that a code block in a docstring follows PEP8. Currently EX03 is using flake8 under the hood, which is no longer compatible with ruff (and black)'s 2024 style.

In my opinion, we can just use ruff here. This should allow us to remove flake8 as a dev requirement as well.

@mroeschke
Copy link
Member

I wonder if it's reasonable to deprecate EX03 in favor of ruff's autoformat of docstrings.

I think there's momentum towards removing EX03. We can't right now since some docstrings are dynamically generated and flake8 is performed those in a separate job (see scripts/validate_docstrings.py)

@tqa236
Copy link
Contributor Author

tqa236 commented Mar 7, 2024

@mroeschke how about adding E704 (Multiple statements on one line (def)) to the list of ignored errors for EX03? Currently there are "--ignore=E203,E3,W503,W504,E402,E731,E128,E124"

@mroeschke
Copy link
Member

how about adding E704 (Multiple statements on one line (def)) to the list of ignored errors for EX03?

If that's the code that conflict with ruff's formating, that sounds good

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

tqa236 commented Mar 7, 2024

@mroeschke this PR should be ready for review, apart from the second commit, which is automatic, the rest are manual small fixes

@mroeschke mroeschke added this to the 3.0 milestone Mar 7, 2024
@mroeschke mroeschke merged commit 15c21a2 into pandas-dev:main Mar 7, 2024
48 checks passed
@mroeschke
Copy link
Member

Thanks @tqa236

@tqa236 tqa236 deleted the bump-ruff-0.3 branch March 7, 2024 22:56
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Bump ruff to latest version

* Autoformat

* Ignore conflicted error

* Ignore false positive
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.

None yet

2 participants