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

[ruff 0.8] [flake8-pytest-style] Remove deprecated rules PT004 and PT005 #14385

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Nov 16, 2024

Summary

Remove PT004 and PT005. These were deprecated in #12837, which landed as part of Ruff 0.6 (released on August 15th). There are no open issues on the tracker asking us to undeprecate them.

Test Plan

  • cargo test
  • git grep PytestMissingFixtureNameUnderscore, git grep PytestIncorrectFixtureNameUnderscore, git grep PT004 and git grep PT005 all show no results
  • Wait to see what the ecosystem report looks like

@AlexWaygood AlexWaygood added the breaking Breaking API change label Nov 16, 2024
@AlexWaygood AlexWaygood changed the title [ruff 0.8] Remove deprecated rules PT004 and PT005 [ruff 0.8] [flake8-pytest-style] Remove deprecated rules PT004 and PT005 Nov 16, 2024
Copy link
Contributor

github-actions bot commented Nov 16, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+1 -3 violations, +0 -0 fixes in 2 projects; 52 projects unchanged)

freedomofpress/securedrop (+1 -0 violations, +0 -0 fixes)

+ molecule/testinfra/ossec/test_journalist_mail.py:14:45: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`)

rotki/rotki (+0 -3 violations, +0 -0 fixes)

- rotkehlchen/tests/fixtures/globaldb.py:207:5: PT004 Fixture `fixture_historical_price_test_data` does not return anything, add leading underscore
- rotkehlchen/tests/fixtures/oracles.py:20:5: PT004 Fixture `fixture_cache_coinlist` does not return anything, add leading underscore
- rotkehlchen/tests/fixtures/thegraph.py:13:5: PT004 Fixture `fixture_add_subgraph_api_key` does not return anything, add leading underscore

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
PT004 3 0 3 0 0
RUF100 1 1 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood
Copy link
Member Author

Ecosystem report analysis:

  • The freedomofpress and rotki codebases see a few errors going away as a result of these removals.
  • All other hits are TOML parse errors due to the fact that various repos had the rules explicitly ignored before now (which feels like it validates the choice to remove these rules)

@AlexWaygood
Copy link
Member Author

Same concern as #14384 (comment) about merging this now...

@MichaReiser MichaReiser removed the do-not-merge Do not merge this pull request label Nov 19, 2024
@MichaReiser MichaReiser merged commit 4e0f708 into ruff-0.8 Nov 19, 2024
20 checks passed
@MichaReiser MichaReiser deleted the alex/remove-pt-rules branch November 19, 2024 09:01
@MichaReiser MichaReiser mentioned this pull request Nov 19, 2024
AlexWaygood added a commit that referenced this pull request Nov 19, 2024
…PT005 (#14385)

Co-authored-by: Micha Reiser <micha@reiser.io>
MichaReiser added a commit that referenced this pull request Nov 20, 2024
…PT005 (#14385)

Co-authored-by: Micha Reiser <micha@reiser.io>
MichaReiser added a commit that referenced this pull request Nov 20, 2024
…PT005 (#14385)

Co-authored-by: Micha Reiser <micha@reiser.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants