ci/lint: drop PLR0912 as a duplicate of C901

This commit is contained in:
2026-10-07 00:40:08 +08:00
parent 9fac1ecfc0
commit e0e19fde8f
5 changed files with 7 additions and 4 deletions
+3
View File
@@ -136,6 +136,9 @@ ignore = [
"COM812", # missing-trailing-comma
"PLC0415", # import-outside-top-level
"TID252",
# Same axis as C901 (conditional branches per function) but a looser default,
# and C901 flags every function it does — keep the one gate (see AGENTS.md).
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments (common on constructors/composed functions)
]
allowed-confusables = [
+1 -1
View File
@@ -425,7 +425,7 @@ async def _maybe_inject_directive_checkpoints(
return new_band
async def run_chat_loop( # noqa: C901, PLR0912 — multi-phase tool loop
async def run_chat_loop( # noqa: C901 — multi-phase tool loop
client: AnyLLMClient,
messages: list[AnyChatMessage],
*,
+1 -1
View File
@@ -218,7 +218,7 @@ async def _run_oneshot(state: ReplState, prompt_text: str) -> int:
return EXIT_OK if ok else EXIT_TURN_FAILED
async def _run_chat( # noqa: C901, PLR0912, PLR0915 — chat orchestration
async def _run_chat( # noqa: C901, PLR0915 — chat orchestration
*,
config_path: Path | None,
provider_name: str | None,
+1 -1
View File
@@ -1083,7 +1083,7 @@ def _flush_assistant_markdown(body: str, *, pretty: bool) -> None:
click.echo()
async def render_events( # noqa: C901, PLR0912, PLR0915 — one branch per event type
async def render_events( # noqa: C901, PLR0915 — one branch per event type
events: AsyncIterator[AgentEvent],
*,
verbose: bool | None = None,
+1 -1
View File
@@ -1512,7 +1512,7 @@ def history_cmd(
@click.argument("action", required=False, type=TODOS_ACTION)
@click.argument("rest", required=False, nargs=-1, type=str)
@click.pass_obj
def todos_cmd( # noqa: C901, PLR0911, PLR0912, PLR0915 — one branch per /todos action
def todos_cmd( # noqa: C901, PLR0911, PLR0915 — one branch per /todos action
state: ReplState, action: str | None, rest: tuple[str, ...]
) -> None:
"""Show or edit the LIFO stack of **task groups**.