Skip to content

Stabilize PLC0207#22918

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

Stabilize PLC0207#22918
ntBre merged 2 commits intobrent/0.15.0from
brent/plc0207

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Jan 28, 2026

I made a couple small tweaks to the docs, but this otherwise looked good to me.

https://docs.astral.sh/ruff/rules/missing-maxsplit-arg/

I made a couple small tweaks to the docs, but this 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 16:20
@astral-sh-bot
Copy link

astral-sh-bot bot commented Jan 28, 2026

ruff-ecosystem results

Linter (stable)

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

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

+ noxfile.py:448:15: PLC0207 [*] String is split more times than necessary

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

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

+ dev/backport/update_backport_status.py:80:21: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/commands/common_options.py:524:26: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2815:50: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:719:34: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/utils/click_validators.py:46:17: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/utils/run_utils.py:120:25: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/utils/selective_checks.py:1766:23: PLC0207 [*] String is split more times than necessary
+ dev/breeze/src/airflow_breeze/utils/version_utils.py:22:16: PLC0207 [*] String is split more times than necessary
+ dev/breeze/tests/test_packages.py:315:30: PLC0207 [*] String is split more times than necessary
+ dev/breeze/tests/test_packages.py:316:39: PLC0207 [*] String is split more times than necessary
+ dev/verify_release_calendar.py:263:16: PLC0207 [*] String is split more times than necessary
+ dev/verify_release_calendar.py:264:12: PLC0207 [*] String is split more times than necessary
+ providers/amazon/tests/system/amazon/aws/example_bedrock.py:76:24: PLC0207 [*] String is split more times than necessary
+ providers/amazon/tests/system/amazon/aws/utils/__init__.py:398:12: PLC0207 [*] String is split more times than necessary
... 2 additional changes omitted for project

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

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

+ superset/db_engine_specs/lint_metadata.py:100:17: PLC0207 [*] String is split more times than necessary
+ tests/common/query_context_generator.py:214:29: PLC0207 [*] String is split more times than necessary
+ tests/common/query_context_generator.py:255:22: PLC0207 [*] String is split more times than necessary

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

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

+ src/bokeh/io/notebook.py:663:26: PLC0207 [*] String is split more times than necessary
+ src/bokeh/util/token.py:142:41: PLC0207 [*] String is split more times than necessary
+ src/bokeh/util/token.py:155:41: PLC0207 [*] String is split more times than necessary

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

+ securedrop/store.py:345:49: PLC0207 [*] String is split more times than necessary

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

+ ibis/examples/gen_registry.py:125:52: PLC0207 [*] String is split more times than necessary

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

+ libs/langchain/langchain_classic/agents/chat/output_parser.py:66:22: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/conversational/output_parser.py:34:28: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/mrkl/output_parser.py:72:28: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/output_parsers/react_json_single_input.py:81:22: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/output_parsers/react_single_input.py:72:28: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/output_parsers/self_ask.py:40:21: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/agents/output_parsers/self_ask.py:47:23: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/chains/constitutional_ai/base.py:329:25: PLC0207 [*] String is split more times than necessary
+ libs/langchain/langchain_classic/output_parsers/pandas_dataframe.py:90:30: PLC0207 [*] String is split more times than necessary
+ libs/partners/openai/langchain_openai/llms/base.py:705:25: PLC0207 [*] String is split more times than necessary

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

+ pandas/compat/_optional.py:165:14: PLC0207 [*] String is split more times than necessary

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

+ bin/update_pythons.py:129:22: PLC0207 [*] String is split more times than necessary
+ cibuildwheel/platforms/macos.py:154:31: PLC0207 [*] String is split more times than necessary
+ cibuildwheel/selector.py:78:26: PLC0207 [*] String is split more times than necessary

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

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

+ zerver/lib/send_email.py:301:16: PLC0207 [*] String is split more times than necessary
+ zerver/lib/send_email.py:449:21: PLC0207 [*] String is split more times than necessary
+ zerver/lib/webhooks/common.py:284:26: PLC0207 [*] String is split more times than necessary
+ zerver/lib/webhooks/common.py:296:16: PLC0207 [*] String is split more times than necessary
+ zerver/middleware.py:230:49: PLC0207 [*] String is split more times than necessary
+ zerver/tests/test_email_change.py:53:15: PLC0207 [*] String is split more times than necessary
+ zerver/views/upload.py:382:16: PLC0207 [*] String is split more times than necessary
+ zerver/webhooks/gitlab/view.py:50:36: PLC0207 [*] String is split more times than necessary
+ zerver/webhooks/stripe/view.py:356:39: PLC0207 [*] String is split more times than necessary
+ zerver/webhooks/wekan/view.py:15:12: PLC0207 [*] String is split more times than necessary

wntrblm/nox (+1 -0 violations, +0 -0 fixes)

+ tests/test_sessions.py:1279:44: PLC0207 [*] String is split more times than necessary

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

+ src/_pytest/config/findpaths.py:236:16: PLC0207 [*] String is split more times than necessary
+ src/_pytest/terminal.py:1037:40: PLC0207 [*] String is split more times than necessary
+ src/_pytest/terminal.py:479:41: PLC0207 [*] String is split more times than necessary

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

+ astropy/io/ascii/latex.py:438:16: PLC0207 [*] String is split more times than necessary

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLC0207 54 54 0 0 0

Linter (preview)

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

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

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

- noxfile.py:448:15: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ noxfile.py:448:15: PLC0207 [*] String is split more times than necessary

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

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

- dev/backport/update_backport_status.py:80:21: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ dev/backport/update_backport_status.py:80:21: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/commands/common_options.py:524:26: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/commands/common_options.py:524:26: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2815:50: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/commands/release_management_commands.py:2815:50: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:719:34: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py:719:34: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/utils/click_validators.py:46:17: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/utils/click_validators.py:46:17: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/utils/run_utils.py:120:25: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/utils/run_utils.py:120:25: PLC0207 [*] String is split more times than necessary
- dev/breeze/src/airflow_breeze/utils/selective_checks.py:1766:23: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ dev/breeze/src/airflow_breeze/utils/selective_checks.py:1766:23: PLC0207 [*] String is split more times than necessary
... 18 additional changes omitted for project

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

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

- superset/db_engine_specs/lint_metadata.py:100:17: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ superset/db_engine_specs/lint_metadata.py:100:17: PLC0207 [*] String is split more times than necessary
- tests/common/query_context_generator.py:214:29: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ tests/common/query_context_generator.py:214:29: PLC0207 [*] String is split more times than necessary
- tests/common/query_context_generator.py:255:22: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ tests/common/query_context_generator.py:255:22: PLC0207 [*] String is split more times than necessary

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

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

- src/bokeh/io/notebook.py:663:26: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/bokeh/io/notebook.py:663:26: PLC0207 [*] String is split more times than necessary
- src/bokeh/util/token.py:142:41: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/bokeh/util/token.py:142:41: PLC0207 [*] String is split more times than necessary
- src/bokeh/util/token.py:155:41: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/bokeh/util/token.py:155:41: PLC0207 [*] String is split more times than necessary

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

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

- securedrop/store.py:345:49: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ securedrop/store.py:345:49: PLC0207 [*] String is split more times than necessary

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

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

- ibis/examples/gen_registry.py:125:52: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ ibis/examples/gen_registry.py:125:52: PLC0207 [*] String is split more times than necessary

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

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

- libs/langchain/langchain_classic/agents/chat/output_parser.py:66:22: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ libs/langchain/langchain_classic/agents/chat/output_parser.py:66:22: PLC0207 [*] String is split more times than necessary
- libs/langchain/langchain_classic/agents/conversational/output_parser.py:34:28: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ libs/langchain/langchain_classic/agents/conversational/output_parser.py:34:28: PLC0207 [*] String is split more times than necessary
- libs/langchain/langchain_classic/agents/mrkl/output_parser.py:72:28: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ libs/langchain/langchain_classic/agents/mrkl/output_parser.py:72:28: PLC0207 [*] String is split more times than necessary
- libs/langchain/langchain_classic/agents/output_parsers/react_json_single_input.py:81:22: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ libs/langchain/langchain_classic/agents/output_parsers/react_json_single_input.py:81:22: PLC0207 [*] String is split more times than necessary
- libs/langchain/langchain_classic/agents/output_parsers/react_single_input.py:72:28: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ libs/langchain/langchain_classic/agents/output_parsers/react_single_input.py:72:28: PLC0207 [*] String is split more times than necessary
... 10 additional changes omitted for project

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

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

- pandas/compat/_optional.py:165:14: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ pandas/compat/_optional.py:165:14: PLC0207 [*] String is split more times than necessary

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

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

- bin/update_pythons.py:129:22: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ bin/update_pythons.py:129:22: PLC0207 [*] String is split more times than necessary
- cibuildwheel/platforms/macos.py:154:31: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ cibuildwheel/platforms/macos.py:154:31: PLC0207 [*] String is split more times than necessary
- cibuildwheel/selector.py:78:26: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ cibuildwheel/selector.py:78:26: PLC0207 [*] String is split more times than necessary

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

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

- zerver/lib/send_email.py:301:16: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ zerver/lib/send_email.py:301:16: PLC0207 [*] String is split more times than necessary
- zerver/lib/send_email.py:449:21: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ zerver/lib/send_email.py:449:21: PLC0207 [*] String is split more times than necessary
- zerver/lib/webhooks/common.py:284:26: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ zerver/lib/webhooks/common.py:284:26: PLC0207 [*] String is split more times than necessary
- zerver/lib/webhooks/common.py:296:16: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ zerver/lib/webhooks/common.py:296:16: PLC0207 [*] String is split more times than necessary
- zerver/middleware.py:230:49: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ zerver/middleware.py:230:49: PLC0207 [*] String is split more times than necessary
... 10 additional changes omitted for project

wntrblm/nox (+1 -1 violations, +0 -0 fixes)

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

- tests/test_sessions.py:1279:44: PLC0207 [*] Replace with `rsplit(..., maxsplit=1)`.
+ tests/test_sessions.py:1279:44: PLC0207 [*] String is split more times than necessary

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

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

- src/_pytest/config/findpaths.py:236:16: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/_pytest/config/findpaths.py:236:16: PLC0207 [*] String is split more times than necessary
- src/_pytest/terminal.py:1037:40: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/_pytest/terminal.py:1037:40: PLC0207 [*] String is split more times than necessary
- src/_pytest/terminal.py:479:41: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ src/_pytest/terminal.py:479:41: PLC0207 [*] String is split more times than necessary

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

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

- astropy/io/ascii/latex.py:438:16: PLC0207 [*] Replace with `split(..., maxsplit=1)`.
+ astropy/io/ascii/latex.py:438:16: PLC0207 [*] String is split more times than necessary

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLC0207 108 54 54 0 0

@ntBre
Copy link
Contributor Author

ntBre commented Jan 28, 2026

The ecosystem results look good overall. There's one (two?) arguable false negative where the pattern the rule is meant to detect occurs three times in the same statement:

https://github.com/apache/superset/blob/d4b89de00174011cadba6b8f86a25612641f7c12/superset/db_engine_specs/lint_metadata.py#L100

    base_name = package_name.split("[")[0].split(">")[0].split("<")[0].split("=")[0]

This seems rare enough not to worry too much about, although there was a second instance in the ecosystem report.

I also don't really love our diagnostic here. I kind of think the message and fix_title are backwards. I might play with that a bit here.

@ntBre
Copy link
Contributor Author

ntBre commented Jan 28, 2026

@amyreese thanks for the review! What do you think of the new message? I couldn't think of anything better for the fix_title, but I tried to go for a simpler primary message that emphasizes the issue instead of the fix.

@amyreese
Copy link
Member

I like it :)

@dylwil3
Copy link
Collaborator

dylwil3 commented Jan 29, 2026

There's one (two?) arguable false negative where the pattern the rule is meant to detect occurs three times in the same statement

Since these are false negatives, not false positives, I'm not too worried. We can try to improve the sensitivity later.

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.

Like the new message!

@ntBre ntBre merged commit 37326f2 into brent/0.15.0 Jan 29, 2026
41 checks passed
@ntBre ntBre deleted the brent/plc0207 branch January 29, 2026 17:05
@ntBre ntBre mentioned this pull request Jan 29, 2026
3 tasks
ntBre added a commit that referenced this pull request Feb 3, 2026
I made a couple small tweaks to the docs, but this otherwise looked good
to me.

https://docs.astral.sh/ruff/rules/missing-maxsplit-arg/
ntBre added a commit that referenced this pull request Feb 3, 2026
I made a couple small tweaks to the docs, but this otherwise looked good
to me.

https://docs.astral.sh/ruff/rules/missing-maxsplit-arg/
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