-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix failing tests for Ruff 0.8 branch #14482
Merged
Merged
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
-_- thank you!! |
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
RUF023 | 167 | 167 | 0 | 0 | 0 |
RUF022 | 146 | 146 | 0 | 0 | 0 |
PLC0206 | 43 | 43 | 0 | 0 | 0 |
PYI063 | 5 | 5 | 0 | 0 | 0 |
B039 | 4 | 4 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+41 -36 violations, +0 -0 fixes in 7 projects; 47 projects unchanged)
apache/airflow (+6 -5 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- airflow/utils/hashlib_wrapper.py:27:9: PYI063 Use PEP 570 syntax for positional-only arguments + airflow/utils/hashlib_wrapper.py:27:9: PYI063 Use PEP 570 syntax for positional-only parameters + providers/src/airflow/providers/cloudant/hooks/cloudant.py:25:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - providers/src/airflow/providers/cloudant/hooks/cloudant.py:25:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + providers/tests/cloudant/hooks/test_cloudant.py:30:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - providers/tests/cloudant/hooks/test_cloudant.py:30:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + providers/tests/google/cloud/utils/test_mlengine_prediction_summary.py:27:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - providers/tests/google/cloud/utils/test_mlengine_prediction_summary.py:27:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons ... 3 additional changes omitted for rule PYI066 + providers/tests/weaviate/operators/test_weaviate.py:28:62: RUF100 [*] Unused `noqa` directive (unused: `E402`) ... 2 additional changes omitted for project
ibis-project/ibis (+4 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ ibis/backends/impala/tests/test_ddl.py:18:44: RUF100 Unused `noqa` directive (unused: `E402`) + ibis/backends/impala/tests/test_parquet_ddl.py:12:44: RUF100 Unused `noqa` directive (unused: `E402`) + ibis/backends/impala/tests/test_partition.py:15:48: RUF100 Unused `noqa` directive (unused: `E402`) + ibis/tests/expr/test_pretty_repr.py:13:66: RUF100 Unused `noqa` directive (unused: `E402`)
pandas-dev/pandas (+3 -3 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
- pandas/_typing.py:276:20: PYI063 Use PEP 570 syntax for positional-only arguments + pandas/_typing.py:276:20: PYI063 Use PEP 570 syntax for positional-only parameters - pandas/_typing.py:291:20: PYI063 Use PEP 570 syntax for positional-only arguments + pandas/_typing.py:291:20: PYI063 Use PEP 570 syntax for positional-only parameters - pandas/_typing.py:297:21: PYI063 Use PEP 570 syntax for positional-only arguments + pandas/_typing.py:297:21: PYI063 Use PEP 570 syntax for positional-only parameters
pypa/cibuildwheel (+2 -2 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ bin/bump_version.py:20:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - bin/bump_version.py:20:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + cibuildwheel/_compat/typing.py:5:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - cibuildwheel/_compat/typing.py:5:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons
pypa/setuptools (+1 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ setuptools/_importlib.py:3:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - setuptools/_importlib.py:3:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons
scikit-build/scikit-build-core (+19 -19 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ docs/conf.py:16:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - docs/conf.py:16:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/builtins.py:5:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/builtins.py:5:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/importlib/metadata.py:15:8: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/importlib/metadata.py:15:8: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/importlib/metadata.py:17:10: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/importlib/metadata.py:17:10: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/importlib/metadata.py:6:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/importlib/metadata.py:6:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/importlib/resources.py:5:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/importlib/resources.py:5:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/tomllib.py:5:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/tomllib.py:5:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/typing.py:14:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/typing.py:14:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/typing.py:19:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/typing.py:19:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_compat/typing.py:6:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_compat/typing.py:6:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/_logging.py:80:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/_logging.py:80:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/scikit_build_core/builder/sysconfig.py:179:8: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/scikit_build_core/builder/sysconfig.py:179:8: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons ... 14 additional changes omitted for project
pytest-dev/pytest (+6 -6 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ src/_pytest/_code/code.py:699:16: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/_pytest/_code/code.py:699:16: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/_pytest/assertion/rewrite.py:299:16: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/_pytest/assertion/rewrite.py:299:16: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons + src/_pytest/pathlib.py:41:4: PYI066 Put branches for newer Python versions first when branching on `sys.version_info` comparisons - src/_pytest/pathlib.py:41:4: PYI066 Use `>=` when using `if`-`else` with `sys.version_info` comparisons ... 5 additional changes omitted for rule PYI066 - testing/example_scripts/dataclasses/test_compare_dataclasses_with_custom_eq.py:13:26: PYI063 Use PEP 570 syntax for positional-only arguments + testing/example_scripts/dataclasses/test_compare_dataclasses_with_custom_eq.py:13:26: PYI063 Use PEP 570 syntax for positional-only parameters ... 4 additional changes omitted for project
Changes by rule (3 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PYI066 | 62 | 31 | 31 | 0 | 0 |
PYI063 | 10 | 5 | 5 | 0 | 0 |
RUF100 | 5 | 5 | 0 | 0 | 0 |
MichaReiser
added a commit
that referenced
this pull request
Nov 20, 2024
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
This fixes the CI failures for the Ruff 0.8 branch.
The root cause is a "merge" conflict that git didn't detect:
pycodestyle
] Stabilize behavior to ignore stub files inambiguous-variable-name (E741)
#14405 removed thepreview_rules
tests forAmbiguousVariableName
(delete change)pycodestyle
] Exemptpytest.importorskip()
calls (E402
) #14474 moved thetest_case
attribute for theAmbigiousVariableName
. This resulted in a delete change (the same as above) but also an addThis PR removes the tests because the behavior has been promoted to stable
Test Plan
cargo test