Skip to content

Commit c71fb34

Browse files
congxiao-wxxclaude
andcommitted
fix(ci): exclude generated _version.py from ruff, restore mypy type guard
- Add _version.py to ruff exclude (setuptools-scm generated file) - Restore assert with noqa:S101 annotation for mypy type narrowing Change-Id: Ie640516e377c937dbb7145da6ca2c8e0424b8f84 Co-developed-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6446b33 commit c71fb34

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ dev = [
5959
[tool.ruff]
6060
line-length = 88
6161
target-version = "py310"
62+
exclude = ["src/agentrun_cli/_version.py"]
6263

6364
[tool.ruff.lint]
6465
select = ["E", "F", "I", "W", "S", "B", "UP"]

src/agentrun_cli/commands/super_agent/invoke_cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _parse_messages(message: str | None, messages_json: str | None) -> list[dict
3535
raise click.UsageError("One of --message/-m or --messages is required")
3636
if message:
3737
return [{"role": "user", "content": message}]
38-
# At this point messages_json is guaranteed non-None by the guard above.
38+
assert messages_json is not None # noqa: S101 — narrowing for mypy; guarded above
3939
try:
4040
parsed = json.loads(messages_json)
4141
except (TypeError, ValueError) as e:

0 commit comments

Comments
 (0)