Skip to content

Comments

Stabilize multiple rules#14462

Merged
AlexWaygood merged 8 commits intoruff-0.8from
micha/ruff-0.8-stabilize-rules
Nov 19, 2024
Merged

Stabilize multiple rules#14462
AlexWaygood merged 8 commits intoruff-0.8from
micha/ruff-0.8-stabilize-rules

Conversation

@MichaReiser
Copy link
Member

  • Stabilize PLC0206
  • Stabilize B039
  • Stabilize UP043
  • Stabilize PYI063
  • Stabilize PYI064
  • Stabilize PYI066
  • Stabilize FAST001 and FAST002
  • Stabilize RUF030

@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Nov 19, 2024
@MichaReiser MichaReiser force-pushed the micha/ruff-0.8-stabilize-rules branch from 31e6943 to f823f03 Compare November 19, 2024 14:40
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+54 -0 violations, +0 -0 fixes in 15 projects; 39 projects unchanged)

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

+ disnake/webhook/async_.py:645:38: B039 Do not use mutable data structures for `ContextVar` defaults

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 (+10 -0 violations, +0 -0 fixes)

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

+ 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()`
+ performance/src/performance_dags/performance_dag/performance_dag_utils.py:137:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ providers/tests/amazon/aws/executors/batch/test_batch_executor.py:667:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ providers/tests/amazon/aws/executors/ecs/test_ecs_executor.py:1234:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ tests/api_connexion/endpoints/test_task_instance_endpoint.py:654:9: PLC0206 Extracting value from dictionary without calling `.items()`
... 4 additional changes omitted for rule PLC0206

apache/superset (+3 -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/jinja_context.py:483:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ 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 (+2 -0 violations, +0 -0 fixes)

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

+ src/bokeh/application/handlers/code.py:201:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ src/bokeh/core/property/wrappers.py:470:9: PLC0206 Extracting value from dictionary without calling `.items()`

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 (+1 -0 violations, +0 -0 fixes)

+ lnbits/requestvars.py:5:31: B039 Do not use mutable data structures for `ContextVar` defaults

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

+ 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()`

tiangolo/fastapi (+1 -0 violations, +0 -0 fixes)

+ docs_src/sql_databases_peewee/sql_app/database.py:7:43: B039 Do not use mutable data structures for `ContextVar` defaults

zulip/zulip (+16 -0 violations, +0 -0 fixes)

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

+ corporate/views/installation_activity.py:82:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ tools/setup/emoji/emoji_setup_utils.py:90:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/actions/realm_settings.py:268:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/mattermost.py:163:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/mattermost.py:847:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/rocketchat.py:169:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/rocketchat.py:217:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/rocketchat.py:252:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/data_import/rocketchat.py:67:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/lib/cache.py:241:5: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/lib/markdown/api_return_values_table_generator.py:187:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/migrations/0382_create_role_based_system_groups.py:59:13: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/migrations/0403_create_role_based_groups_for_internal_realms.py:68:9: PLC0206 Extracting value from dictionary without calling `.items()`
+ zerver/tests/test_events.py:482:13: PLC0206 Extracting value from dictionary without calling `.items()`
... 2 additional changes omitted for project

python-trio/trio (+2 -0 violations, +0 -0 fixes)

+ src/trio/testing/_fake_net.py:497:9: PYI063 Use PEP 570 syntax for positional-only arguments
+ src/trio/testing/_fake_net.py:505:9: PYI063 Use PEP 570 syntax for positional-only arguments

pytest-dev/pytest (+1 -0 violations, +0 -0 fixes)

+ testing/example_scripts/dataclasses/test_compare_dataclasses_with_custom_eq.py:13:26: PYI063 Use PEP 570 syntax for positional-only arguments

Changes by rule (3 rules affected)

code total + violation - violation + fix - fix
PLC0206 43 43 0 0 0
PYI063 7 7 0 0 0
B039 4 4 0 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through the ecosystem report and couldn't see any false positives or places where the rules were recommending something obviously undesirable. These have all been in preview for a while, and there are no open issues about them.

@AlexWaygood AlexWaygood merged commit 1c0214f into ruff-0.8 Nov 19, 2024
@AlexWaygood AlexWaygood deleted the micha/ruff-0.8-stabilize-rules branch November 19, 2024 15:03
AlexWaygood pushed a commit that referenced this pull request Nov 19, 2024
@AlexWaygood AlexWaygood mentioned this pull request Nov 19, 2024
MichaReiser added a commit that referenced this pull request Nov 20, 2024
MichaReiser added a commit that referenced this pull request Nov 20, 2024
@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

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants