refactor: enforce BasedPyright strict type checking (#5158)

This commit is contained in:
chengyongru
2026-07-29 21:37:11 +08:00
committed by GitHub
parent e703481755
commit 757ad9c764
166 changed files with 4728 additions and 2621 deletions
@@ -2,6 +2,7 @@
from __future__ import annotations
from inspect import Parameter, signature
from unittest.mock import AsyncMock, MagicMock
import pytest
@@ -13,6 +14,13 @@ from nanobot.command.builtin import (
from nanobot.command.router import CommandContext, CommandRouter
def test_command_context_requires_loop_as_keyword_dependency() -> None:
loop_parameter = signature(CommandContext).parameters["loop"]
assert loop_parameter.kind is Parameter.KEYWORD_ONLY
assert loop_parameter.default is Parameter.empty
class TestIsDispatchableCommand:
"""Unit tests for the is_dispatchable_command() predicate."""