Skip to content

[pylint] Stabilize unnecessary-lambda (PLW0108) #18553

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Jun 8, 2025

No description provided.

@dylwil3 dylwil3 added this to the v0.12 milestone Jun 8, 2025
@dylwil3 dylwil3 added the rule Implementing or modifying a lint rule label Jun 8, 2025
Copy link
Contributor

github-actions bot commented Jun 8, 2025

ruff-ecosystem results

Linter (stable)

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

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

+ disnake/client.py:1292:52: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ disnake/client.py:1293:53: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ disnake/ext/commands/flag_converter.py:330:33: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

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

+ airflow-core/src/airflow/traces/tracer.py:291:40: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ airflow-core/tests/unit/models/test_xcom.py:331:17: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:3803:46: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/src/airflow_breeze/utils/publish_docs_to_s3.py:325:17: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/utils/pod_manager.py:635:59: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/common/compat/src/airflow/providers/common/compat/lineage/hook.py:75:18: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:358:27: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:412:21: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:503:32: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ providers/standard/tests/unit/standard/operators/test_bash.py:241:30: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 7 additional changes omitted for project

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

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

+ superset/dashboards/schemas.py:306:42: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ superset/datasets/schemas.py:105:23: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ superset/utils/csv.py:112:43: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/utils/date_parser_tests.py:514:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/utils/date_parser_tests.py:528:33: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

+ tests/unit/commands/local/lib/test_stack_provider.py:114:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:152:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:190:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:229:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/commands/local/lib/test_stack_provider.py:270:51: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/lib/observability/xray_traces/test_xray_event_mappers.py:69:46: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit/lib/telemetry/test_event.py:137:21: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

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

+ src/bokeh/core/property/dataspec.py:201:71: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/io/webdriver.py:219:17: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/annotations/geometry.py:85:31: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/annotations/geometry.py:89:32: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/annotations/geometry.py:93:30: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/annotations/geometry.py:97:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/sources.py:203:37: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/sources.py:205:48: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1367:101: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1875:28: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1877:34: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1878:35: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1881:36: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1882:37: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1887:29: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1888:29: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/bokeh/models/tools.py:1889:29: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 26 additional changes omitted for project

freedomofpress/securedrop (+1 -0 violations, +0 -0 fixes)

+ securedrop/pretty_bad_protocol/gnupg.py:644:26: PLW0108 Lambda may be unnecessary; consider inlining inner function

fronzbot/blinkpy (+5 -0 violations, +0 -0 fixes)

+ tests/test_blink_functions.py:192:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_sync_module.py:616:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:135:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:149:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/test_util.py:166:13: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

+ ibis/backends/impala/tests/test_value_exprs.py:217:9: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/sql/test_sql.py:671:22: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_aggregation.py:1481:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_aggregation.py:1481:35: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:209:24: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:844:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:863:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:871:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_vectorized_udf.py:75:42: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_vectorized_udf.py:76:42: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 3 additional changes omitted for project

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

+ libs/core/tests/unit_tests/messages/test_utils.py:425:23: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ libs/core/tests/unit_tests/messages/test_utils.py:443:23: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ libs/core/tests/unit_tests/runnables/test_history.py:810:31: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ libs/core/tests/unit_tests/runnables/test_history.py:836:31: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

+ src/latch/account.py:67:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/idl/core/execution.py:60:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/ldata/path.py:335:29: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/registry/project.py:37:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/registry/record.py:92:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/registry/table.py:92:25: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

+ pymilvus/bulk_writer/constants.py:55:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:56:34: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:59:40: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:60:32: PLW0108 Lambda may be unnecessary; consider inlining inner function

rotki/rotki (+0 -1 violations, +0 -0 fixes)

- rotkehlchen/tests/utils/blockchain.py:684:96: RUF100 [*] Unused `noqa` directive (non-enabled: `PLW0108`)

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

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

+ zerver/lib/typed_endpoint_validators.py:101:28: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ zerver/lib/typed_endpoint_validators.py:72:27: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ zerver/lib/typed_endpoint_validators.py:84:27: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ zerver/views/realm.py:166:24: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
PLW0108 121 121 0 0 0
RUF100 1 0 1 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 0370d8a to 040fb6b Compare June 8, 2025 19:55
@ntBre ntBre requested a review from AlexWaygood as a code owner June 8, 2025 19:55
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 040fb6b to 9252447 Compare June 8, 2025 20:18
@AlexWaygood AlexWaygood removed their request for review June 8, 2025 20:29
@ntBre ntBre force-pushed the brent/release-0.12.0 branch from 9252447 to 829acf4 Compare June 9, 2025 00:22
@dylwil3 dylwil3 force-pushed the dylan/stabilize-unnecessary-lambda branch from f68fc2a to 3724dfb Compare June 9, 2025 13:04
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

I spot-checked the ecosystem results, and they LGTM too

@dylwil3 dylwil3 merged commit 886fc1a into brent/release-0.12.0 Jun 9, 2025
34 checks passed
@dylwil3 dylwil3 deleted the dylan/stabilize-unnecessary-lambda branch June 9, 2025 17:47
@dylwil3 dylwil3 mentioned this pull request Jun 9, 2025
2 tasks
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