mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-06 20:16:47 +00:00
🚨 Fix: 修复 pyright 类型推导问题 (#3347)
This commit is contained in:
@ -19,7 +19,7 @@ class MatcherProvider(abc.ABC, MutableMapping[int, list[type["Matcher"]]]):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class _DictProvider(defaultdict, MatcherProvider):
|
||||
class _DictProvider(defaultdict[int, list[type["Matcher"]]], MatcherProvider): # type: ignore
|
||||
def __init__(self, matchers: Mapping[int, list[type["Matcher"]]]):
|
||||
super().__init__(list, matchers)
|
||||
|
||||
|
@ -509,7 +509,7 @@ class ArgumentParser(ArgParser):
|
||||
super()._parse_optional(arg_string) if isinstance(arg_string, str) else None
|
||||
)
|
||||
|
||||
def _print_message(self, message: str, file: Optional[IO[str]] = None):
|
||||
def _print_message(self, message: str, file: Optional[IO[str]] = None): # type: ignore
|
||||
if (msg := parser_message.get(None)) is not None:
|
||||
parser_message.set(msg + message)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user