mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 23:47:54 +08:00
ci/lint: drop PLR0912 as a duplicate of C901
This commit is contained in:
@@ -136,6 +136,9 @@ ignore = [
|
|||||||
"COM812", # missing-trailing-comma
|
"COM812", # missing-trailing-comma
|
||||||
"PLC0415", # import-outside-top-level
|
"PLC0415", # import-outside-top-level
|
||||||
"TID252",
|
"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)
|
"PLR0913", # too-many-arguments (common on constructors/composed functions)
|
||||||
]
|
]
|
||||||
allowed-confusables = [
|
allowed-confusables = [
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ async def _maybe_inject_directive_checkpoints(
|
|||||||
return new_band
|
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,
|
client: AnyLLMClient,
|
||||||
messages: list[AnyChatMessage],
|
messages: list[AnyChatMessage],
|
||||||
*,
|
*,
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ async def _run_oneshot(state: ReplState, prompt_text: str) -> int:
|
|||||||
return EXIT_OK if ok else EXIT_TURN_FAILED
|
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,
|
config_path: Path | None,
|
||||||
provider_name: str | None,
|
provider_name: str | None,
|
||||||
|
|||||||
@@ -1083,7 +1083,7 @@ def _flush_assistant_markdown(body: str, *, pretty: bool) -> None:
|
|||||||
click.echo()
|
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],
|
events: AsyncIterator[AgentEvent],
|
||||||
*,
|
*,
|
||||||
verbose: bool | None = None,
|
verbose: bool | None = None,
|
||||||
|
|||||||
@@ -1512,7 +1512,7 @@ def history_cmd(
|
|||||||
@click.argument("action", required=False, type=TODOS_ACTION)
|
@click.argument("action", required=False, type=TODOS_ACTION)
|
||||||
@click.argument("rest", required=False, nargs=-1, type=str)
|
@click.argument("rest", required=False, nargs=-1, type=str)
|
||||||
@click.pass_obj
|
@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, ...]
|
state: ReplState, action: str | None, rest: tuple[str, ...]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Show or edit the LIFO stack of **task groups**.
|
"""Show or edit the LIFO stack of **task groups**.
|
||||||
|
|||||||
Reference in New Issue
Block a user