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

Fix failing tests for Ruff 0.8 branch #14482

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Nov 20, 2024

Summary

This fixes the CI failures for the Ruff 0.8 branch.

The root cause is a "merge" conflict that git didn't detect:

This PR removes the tests because the behavior has been promoted to stable

Test Plan

cargo test

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Nov 20, 2024
@MichaReiser MichaReiser merged commit 93fbd33 into ruff-0.8 Nov 20, 2024
19 checks passed
@MichaReiser MichaReiser deleted the micha/fix-snapshot-difference branch November 20, 2024 09:43
@AlexWaygood
Copy link
Member

-_- thank you!!

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+365 -0 violations, +0 -0 fixes in 22 projects; 32 projects unchanged)

DisnakeDev/disnake (+168 -0 violations, +0 -0 fixes)

+ disnake/abc.py:205:17: RUF023 [*] `_Overwrites.__slots__` is not sorted
+ disnake/abc.py:49:11: RUF022 [*] `__all__` is not sorted
+ disnake/activity.py:13:11: RUF022 [*] `__all__` is not sorted
+ disnake/activity.py:289:17: RUF023 [*] `Activity.__slots__` is not sorted
+ disnake/activity.py:530:17: RUF023 [*] `Streaming.__slots__` is not sorted
+ disnake/activity.py:619:17: RUF023 [*] `Spotify.__slots__` is not sorted
+ disnake/activity.py:803:17: RUF023 [*] `CustomActivity.__slots__` is not sorted
+ disnake/app_commands.py:1017:17: RUF023 [*] `ApplicationCommandPermissions.__slots__` is not sorted
+ disnake/app_commands.py:1075:17: RUF023 [*] `GuildApplicationCommandPermissions.__slots__` is not sorted
+ disnake/app_commands.py:241:17: RUF023 [*] `Option.__slots__` is not sorted
... 111 additional changes omitted for rule RUF023
+ disnake/app_commands.py:49:11: RUF022 [*] `__all__` is not sorted
+ disnake/appinfo.py:23:11: RUF022 [*] `__all__` is not sorted
+ disnake/audit_logs.py:34:11: RUF022 [*] `__all__` is not sorted
+ disnake/automod.py:51:11: RUF022 [*] `__all__` is not sorted
+ disnake/channel.py:53:11: RUF022 [*] `__all__` is not sorted
+ disnake/client.py:100:11: RUF022 [*] `__all__` is not sorted
... 42 additional changes omitted for rule RUF022
+ disnake/webhook/async_.py:645:38: B039 Do not use mutable data structures for `ContextVar` defaults
... 151 additional changes omitted for project

RasaHQ/rasa (+2 -0 violations, +0 -0 fixes)

+ stubs/aio_pika/__init__.pyi:23:11: RUF022 [*] `__all__` is not sorted
+ stubs/sanic.pyi:11:11: RUF022 [*] `__all__` is not sorted

PlasmaPy/PlasmaPy (+4 -0 violations, +0 -0 fixes)

+ src/plasmapy/particles/_special_particles.py:260:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/particles/decorators.py:677:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/particles/ionization_state_collection.py:479:13: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/plasmapy/plasma/grids.py:769:9: PLC0206 Extracting value from dictionary without calling `.items()`

apache/airflow (+26 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ airflow/__init__.py:63:11: RUF022 [*] `__all__` is not sorted
+ airflow/decorators/__init__.py:38:11: RUF022 [*] `__all__` is not sorted
+ airflow/decorators/__init__.pyi:46:11: RUF022 [*] `__all__` is not sorted
+ airflow/models/__init__.py:23:11: RUF022 [*] `__all__` is not sorted
+ airflow/providers_manager.py:104:17: RUF023 [*] `LazyDictWithCache.__slots__` is not sorted
+ airflow/secrets/__init__.py:30:11: RUF022 [*] `__all__` is not sorted
+ airflow/typing_compat.py:22:11: RUF022 [*] `__all__` is not sorted
... 10 additional changes omitted for rule RUF022
+ airflow/utils/hashlib_wrapper.py:27:9: PYI063 Use PEP 570 syntax for positional-only parameters
+ airflow/www/views.py:2228:13: PLC0206 Extracting value from dictionary without calling `.items()`
+ docs/conf.py:468:5: PLC0206 Extracting value from dictionary without calling `.items()`
... 16 additional changes omitted for project

apache/superset (+6 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ RELEASING/changelog.py:227:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ superset/examples/data_loading.py:36:11: RUF022 [*] `__all__` is not sorted
+ superset/jinja_context.py:483:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ superset/utils/pandas_postprocessing/__init__.py:43:11: RUF022 [*] `__all__` is not sorted
+ superset/views/__init__.py:30:11: RUF022 [*] `__all__` is not sorted
+ tests/integration_tests/reports/api_tests.py:303:9: PLC0206 Extracting value from dictionary without calling `.items()`

aws/aws-sam-cli (+1 -0 violations, +0 -0 fixes)

+ tests/integration/pipeline/test_bootstrap_command.py:229:9: PLC0206 Extracting value from dictionary without calling `.items()`

bokeh/bokeh (+55 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ release/checks.py:24:11: RUF022 [*] `__all__` is not sorted
+ src/bokeh/application/handlers/code.py:201:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/bokeh/client/__init__.py:46:11: RUF022 [*] `__all__` is not sorted
+ src/bokeh/client/states.py:40:11: RUF022 [*] `__all__` is not sorted
+ src/bokeh/colors/__init__.py:37:11: RUF022 [*] `__all__` is not sorted
+ src/bokeh/core/enums.py:91:11: RUF022 [*] `__all__` is not sorted
+ src/bokeh/core/has_props.py:81:11: RUF022 [*] `__all__` is not sorted
... 48 additional changes omitted for rule RUF022
+ src/bokeh/core/property/wrappers.py:470:9: PLC0206 Extracting value from dictionary without calling `.items()`
... 47 additional changes omitted for project

ibis-project/ibis (+39 -0 violations, +0 -0 fixes)

+ ibis/backends/impala/udf.py:24:11: RUF022 [*] `__all__` is not sorted
+ ibis/backends/sql/compilers/__init__.py:3:11: RUF022 [*] `__all__` is not sorted
+ ibis/backends/sql/compilers/base.py:178:17: RUF023 [*] `FuncGen.__slots__` is not sorted
+ ibis/backends/sql/compilers/base.py:83:21: RUF023 [*] `_Accessor.__slots__` is not sorted
+ ibis/common/annotations.py:105:17: RUF023 [*] `Annotation.__slots__` is not sorted
+ ibis/common/annotations.py:207:17: RUF023 [*] `Argument.__slots__` is not sorted
+ ibis/common/annotations.py:42:17: RUF023 [*] `AttributeValidationError.__slots__` is not sorted
+ ibis/common/annotations.py:54:17: RUF023 [*] `ReturnValidationError.__slots__` is not sorted
... 32 additional changes omitted for rule RUF023
... 31 additional changes omitted for project

langchain-ai/langchain (+1 -0 violations, +0 -0 fixes)

+ libs/core/langchain_core/runnables/config.py:114:38: B039 Do not use mutable data structures for `ContextVar` defaults

latchbio/latch (+6 -0 violations, +0 -0 fixes)

+ src/latch/functions/operators.py:183:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:37:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:48:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:59:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:68:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/latch/functions/operators.py:73:5: PLC0206 Extracting value from dictionary without calling `.items()`

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

+ lnbits/lnurl.py:59:11: RUF022 [*] `__all__` is not sorted
+ lnbits/requestvars.py:5:31: B039 Do not use mutable data structures for `ContextVar` defaults
+ lnbits/wallets/__init__.py:56:11: RUF022 [*] `__all__` is not sorted

milvus-io/pymilvus (+2 -0 violations, +0 -0 fixes)

+ pymilvus/__init__.py:74:11: RUF022 [*] `__all__` is not sorted
+ pymilvus/bulk_writer/buffer.py:96:9: PLC0206 Extracting value from dictionary without calling `.items()`

pandas-dev/pandas (+4 -0 violations, +0 -0 fixes)

+ 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 parameters
+ pandas/_typing.py:297:21: PYI063 Use PEP 570 syntax for positional-only parameters
+ pandas/io/stata.py:2209:5: PLC0206 Extracting value from dictionary without calling `.items()`

pypa/build (+3 -0 violations, +0 -0 fixes)

+ src/build/__init__.py:23:11: RUF022 [*] `__all__` is not sorted
+ src/build/_ctx.py:91:11: RUF022 [*] `__all__` is not sorted
+ src/build/env.py:369:11: RUF022 [*] `__all__` is not sorted

pypa/cibuildwheel (+2 -0 violations, +0 -0 fixes)

+ cibuildwheel/_compat/typing.py:10:11: RUF022 [*] `__all__` is not sorted
+ cibuildwheel/typing.py:8:11: RUF022 [*] `__all__` is not sorted

scikit-build/scikit-build (+3 -0 violations, +0 -0 fixes)

+ skbuild/__init__.py:16:11: RUF022 [*] `__all__` is not sorted
+ skbuild/_compat/typing.py:10:11: RUF022 [*] `__all__` is not sorted
+ tests/samples/issue-707-nested-packages/hello_nested/__init__.py:6:11: RUF022 [*] `__all__` is not sorted

scikit-build/scikit-build-core (+6 -0 violations, +0 -0 fixes)

+ src/scikit_build_core/_compat/importlib/metadata.py:24:11: RUF022 [*] `__all__` is not sorted
+ src/scikit_build_core/_logging.py:25:11: RUF022 [*] `__all__` is not sorted
+ src/scikit_build_core/ast/ast.py:14:11: RUF022 [*] `__all__` is not sorted
+ src/scikit_build_core/ast/ast.py:23:17: RUF023 [*] `Node.__slots__` is not sorted
+ src/scikit_build_core/ast/tokenizer.py:48:17: RUF023 [*] `Token.__slots__` is not sorted
+ src/scikit_build_core/build/__init__.py:112:16: RUF022 [*] `__all__` is not sorted

... Truncated remaining completed project reports due to GitHub comment length restrictions

Changes by rule (5 rules affected)

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

@AlexWaygood AlexWaygood added this to the v0.8 milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants