Skip to content

Comments

[ruff-0.8] [ruff] Stabilise unsorted-dunder-all and unsorted-dunder-slots#14468

Merged
AlexWaygood merged 1 commit intoruff-0.8from
sorting-stabilise
Nov 20, 2024
Merged

[ruff-0.8] [ruff] Stabilise unsorted-dunder-all and unsorted-dunder-slots#14468
AlexWaygood merged 1 commit intoruff-0.8from
sorting-stabilise

Conversation

@AlexWaygood
Copy link
Member

Summary

These rules were implemented in January, have been very stable, and have no open issues about them. They were highly requested by the community prior to being implemented. Let's stabilise them!

Test Plan

Ecosystem check on this PR.

@AlexWaygood AlexWaygood added the rule Implementing or modifying a lint rule label Nov 19, 2024
@AlexWaygood AlexWaygood added this to the v0.8 milestone Nov 19, 2024
@codspeed-hq

This comment was marked as spam.

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+364 -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 (+25 -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
... 9 additional changes omitted for rule RUF022
+ airflow/utils/hashlib_wrapper.py:27:9: PYI063 Use PEP 570 syntax for positional-only arguments
+ 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()`
... 15 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 arguments
+ pandas/_typing.py:291:20: PYI063 Use PEP 570 syntax for positional-only arguments
+ pandas/_typing.py:297:21: PYI063 Use PEP 570 syntax for positional-only arguments
+ 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 145 145 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 no linter changes.

@AlexWaygood
Copy link
Member Author

lots of ecosystem hits, but I can't see any false positives from a quick skim; I think the rules are working as intended.

@AlexWaygood AlexWaygood merged commit f89d780 into ruff-0.8 Nov 20, 2024
@AlexWaygood AlexWaygood deleted the sorting-stabilise branch November 20, 2024 07:34
@AlexWaygood AlexWaygood mentioned this pull request Nov 20, 2024
MichaReiser pushed a commit that referenced this pull request Nov 20, 2024
…der-slots` (#14468)

## Summary

These rules were implemented in January, have been very stable, and have
no open issues about them. They were highly requested by the community
prior to being implemented. Let's stabilise them!

## Test Plan

Ecosystem check on this PR.
MichaReiser pushed a commit that referenced this pull request Nov 20, 2024
…der-slots` (#14468)

## Summary

These rules were implemented in January, have been very stable, and have
no open issues about them. They were highly requested by the community
prior to being implemented. Let's stabilise them!

## Test Plan

Ecosystem check on this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants