-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Deprecate PT004 and PT005 #12837
Merged
Merged
Deprecate PT004 and PT005 #12837
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MichaReiser
commented
Aug 12, 2024
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs
Outdated
Show resolved
Hide resolved
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PT004 | 355 | 0 | 355 | 0 | 0 |
PT005 | 1 | 0 | 1 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+4 -356 violations, +0 -0 fixes in 4 projects; 50 projects unchanged)
apache/airflow (+0 -316 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- helm_tests/airflow_aux/test_pod_template_file.py:48:9: PT004 Fixture `setup_test_cases` does not return anything, add leading underscore - kubernetes_tests/conftest.py:27:5: PT004 Fixture `initialize_providers_manager` does not return anything, add leading underscore - kubernetes_tests/test_base.py:58:9: PT004 Fixture `base_tests_setup` does not return anything, add leading underscore - kubernetes_tests/test_kubernetes_pod_operator.py:89:5: PT004 Fixture `mock_get_connection` does not return anything, add leading underscore - kubernetes_tests/test_kubernetes_pod_operator.py:98:9: PT004 Fixture `setup_tests` does not return anything, add leading underscore - tests/always/test_pandas.py:31:9: PT004 Fixture `setup_test_cases` does not return anything, add leading underscore - tests/always/test_pandas.py:48:9: PT004 Fixture `setup_test_cases` does not return anything, add leading underscore - tests/always/test_providers_manager.py:57:9: PT004 Fixture `inject_fixtures` does not return anything, add leading underscore - tests/api_connexion/conftest.py:64:5: PT004 Fixture `set_auto_role_public` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_config_endpoint.py:238:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_config_endpoint.py:70:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_connection_endpoint.py:61:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_endpoint.py:122:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_parsing.py:67:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_run_endpoint.py:132:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_source_endpoint.py:74:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_stats_endpoint.py:62:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dag_warning_endpoint.py:67:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dataset_endpoint.py:655:9: PT004 Fixture `time_freezer` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dataset_endpoint.py:835:9: PT004 Fixture `time_freezer` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_dataset_endpoint.py:84:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore - tests/api_connexion/endpoints/test_event_log_endpoint.py:102:9: PT004 Fixture `setup_attrs` does not return anything, add leading underscore ... 294 additional changes omitted for rule PT004 - tests/providers/ssh/operators/test_ssh.py:68:9: PT005 Fixture `_patch_exec_ssh_client` returns a value, remove leading underscore ... 293 additional changes omitted for project
apache/superset (+0 -40 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- tests/integration_tests/celery_tests.py:71:5: PT004 Fixture `setup_sqllab` does not return anything, add leading underscore - tests/integration_tests/charts/api_tests.py:1274:9: PT004 Fixture `load_energy_charts` does not return anything, add leading underscore - tests/integration_tests/charts/api_tests.py:89:9: PT004 Fixture `clear_data_cache` does not return anything, add leading underscore - tests/integration_tests/charts/data/api_tests.py:93:5: PT004 Fixture `skip_by_backend` does not return anything, add leading underscore - tests/integration_tests/conftest.py:120:5: PT004 Fixture `setup_sample_data` does not return anything, add leading underscore - tests/integration_tests/core_tests.py:79:5: PT004 Fixture `cleanup` does not return anything, add leading underscore - tests/integration_tests/dashboards/filter_state/api_tests.py:57:5: PT004 Fixture `cache` does not return anything, add leading underscore - tests/integration_tests/explore/api_tests.py:66:5: PT004 Fixture `cache` does not return anything, add leading underscore - tests/integration_tests/explore/form_data/api_tests.py:68:5: PT004 Fixture `cache` does not return anything, add leading underscore - tests/integration_tests/fixtures/birth_names_dashboard.py:37:5: PT004 Fixture `load_birth_names_data` does not return anything, add leading underscore ... 30 additional changes omitted for project
freedomofpress/securedrop (+1 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ molecule/testinfra/ossec/test_journalist_mail.py:14:45: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`)
rotki/rotki (+3 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ rotkehlchen/tests/fixtures/globaldb.py:200:52: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`) + rotkehlchen/tests/fixtures/oracles.py:20:118: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`) + rotkehlchen/tests/fixtures/thegraph.py:12:67: RUF100 [*] Unused `noqa` directive (non-enabled: `PT004`)
Changes by rule (3 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PT004 | 355 | 0 | 355 | 0 | 0 |
RUF100 | 4 | 4 | 0 | 0 | 0 |
PT005 | 1 | 0 | 1 | 0 | 0 |
AlexWaygood
approved these changes
Aug 12, 2024
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fixture.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Merged
AlexWaygood
added a commit
that referenced
this pull request
Aug 14, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
MichaReiser
added a commit
that referenced
this pull request
Aug 14, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
MichaReiser
added a commit
that referenced
this pull request
Aug 14, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Deprecates the pytest rules PT004 and PT005.
See #8796