Skip to content

Conversation

@TaKO8Ki
Copy link
Contributor

@TaKO8Ki TaKO8Ki commented Oct 10, 2025

Summary

Fixes a part of #20590 and follow up to #20734

Rolling out DiagnosticTag to every existing rule in one go would complicate the review, so in this pull request I’ve limited the changes to flake8 and numpy. (RUF100, PD011, F811, F842, RUF029)

Test Plan

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

// PD007
"ix" if checker.is_rule_enabled(Rule::PandasUseOfDotIx) => {
checker.report_diagnostic(PandasUseOfDotIx, range)
let mut diagnostic = checker.report_diagnostic(PandasUseOfDotIx, range);
Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I'm not sure about using deprecated here. The method isn't deprecated according to pandas documentation; they only advise against it. To me, that makes this rule similar to other rules that recommend one pattern over another because it's less error prone

Copy link
Contributor Author

@TaKO8Ki TaKO8Ki Oct 17, 2025

Choose a reason for hiding this comment

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

This PandasUseOfDotIx rule is other one PD007 https://docs.astral.sh/ruff/rules/pandas-use-of-dot-ix. It says:

The .ix method is deprecated as its behavior is ambiguous.

So it seems that the method is deprecated?

@MichaReiser MichaReiser added the diagnostics Related to reporting of diagnostics. label Oct 12, 2025
@TaKO8Ki TaKO8Ki force-pushed the add-DiagnosticTag-to-pyflakes-rules branch from 207d914 to cb59ef8 Compare October 17, 2025 18:58
@TaKO8Ki TaKO8Ki requested a review from MichaReiser October 17, 2025 19:05
@TaKO8Ki
Copy link
Contributor Author

TaKO8Ki commented Oct 17, 2025

@MichaReiser Thank you for the review. I have addressed your comments.

@MichaReiser
Copy link
Member

Thanks

@MichaReiser MichaReiser merged commit b6b96d7 into astral-sh:main Oct 19, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Related to reporting of diagnostics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants