Skip to content

Stabilize PLW0108#22927

Merged
ntBre merged 2 commits intobrent/0.15.0from
brent/plw0108
Jan 29, 2026
Merged

Stabilize PLW0108#22927
ntBre merged 2 commits intobrent/0.15.0from
brent/plw0108

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Jan 28, 2026

I tried to simplify the docs slightly by using a code block instead of a fairly
long inline function definition, but the docs and tests otherwise looked good to
me.

https://docs.astral.sh/ruff/rules/unnecessary-lambda/

I tried to simplify the docs slightly by using a code block instead of a fairly
long inline function definition, but the docs and tests otherwise looked good to
me.
@ntBre ntBre added this to the v0.15 milestone Jan 28, 2026
@ntBre ntBre added the rule Implementing or modifying a lint rule label Jan 28, 2026
@ntBre ntBre requested review from amyreese and dylwil3 January 28, 2026 18:52
@astral-sh-bot
Copy link

astral-sh-bot bot commented Jan 28, 2026

ruff-ecosystem results

Linter (stable)

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

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

+ disnake/client.py:1286:52: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ disnake/client.py:1287: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
+ tests/ext/tasks/test_loops.py:72:15: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

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

+ airflow-core/src/airflow/observability/trace.py:102:40: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ airflow-core/tests/unit/models/test_xcom.py:358:17: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:4084:46: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/src/airflow_breeze/commands/testing_commands.py:1687:35: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/src/airflow_breeze/utils/docs_version_validation.py:100:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_candidate_command.py:146:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_candidate_command.py:226:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_candidate_command.py:297:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_candidate_command.py:71:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_command.py:215:50: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ dev/breeze/tests/test_release_command.py:315:50: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 22 additional changes omitted for project

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

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

+ superset/dashboards/schemas.py:325:42: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ superset/datasets/schemas.py:128: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/integration_tests/viz_tests.py:1743:42: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/utils/date_parser_tests.py:534:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/utils/date_parser_tests.py:548:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/views/test_base_theme_helpers.py:320:39: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/views/test_base_theme_helpers.py:354:39: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/views/test_base_theme_helpers.py:385:39: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ tests/unit_tests/views/test_base_theme_helpers.py:458:39: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 1 additional changes omitted for project

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

+ samcli/local/docker/platform_config.py:190:15: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ samcli/local/docker/platform_config.py:191:14: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ samcli/local/docker/platform_config.py:192:16: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ 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 --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
... 29 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 (+11 -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_client.py:1007:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:210:24: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:980:13: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_client.py:999: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
+ ibis/backends/tests/test_vectorized_udf.py:95:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ ibis/backends/tests/test_vectorized_udf.py:96:45: PLW0108 Lambda may be unnecessary; consider inlining inner function
... 1 additional changes omitted for project

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

+ libs/langchain/langchain_classic/evaluation/parsing/base.py:179:41: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ libs/langchain/langchain_classic/evaluation/parsing/base.py:180:39: 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:344: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:106:25: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ src/latch/registry/table.py:103:25: PLW0108 Lambda may be unnecessary; consider inlining inner function

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

+ pymilvus/bulk_writer/constants.py:59:27: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:60:33: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:61:34: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:64:40: PLW0108 Lambda may be unnecessary; consider inlining inner function
+ pymilvus/bulk_writer/constants.py:65:32: 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 144 144 0 0 0
RUF100 1 0 1 0 0

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

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

Nice! The docs read more nicely this way

@ntBre ntBre merged commit ca6a20d into brent/0.15.0 Jan 29, 2026
41 checks passed
@ntBre ntBre deleted the brent/plw0108 branch January 29, 2026 14:06
@ntBre ntBre mentioned this pull request Jan 29, 2026
3 tasks
ntBre added a commit that referenced this pull request Feb 3, 2026
I tried to simplify the docs slightly by using a code block instead of a
fairly
long inline function definition, but the docs and tests otherwise looked
good to
me.

https://docs.astral.sh/ruff/rules/unnecessary-lambda/
ntBre added a commit that referenced this pull request Feb 3, 2026
I tried to simplify the docs slightly by using a code block instead of a
fairly
long inline function definition, but the docs and tests otherwise looked
good to
me.

https://docs.astral.sh/ruff/rules/unnecessary-lambda/
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.

3 participants