mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-31 06:56:39 +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 |         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"]]]): |     def __init__(self, matchers: Mapping[int, list[type["Matcher"]]]): | ||||||
|         super().__init__(list, matchers) |         super().__init__(list, matchers) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -509,7 +509,7 @@ class ArgumentParser(ArgParser): | |||||||
|             super()._parse_optional(arg_string) if isinstance(arg_string, str) else None |             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: |         if (msg := parser_message.get(None)) is not None: | ||||||
|             parser_message.set(msg + message) |             parser_message.set(msg + message) | ||||||
|         else: |         else: | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ | |||||||
|     "eslint-plugin-react-hooks": "^4.6.0", |     "eslint-plugin-react-hooks": "^4.6.0", | ||||||
|     "eslint-plugin-regexp": "^1.15.0", |     "eslint-plugin-regexp": "^1.15.0", | ||||||
|     "prettier": "^3.0.3", |     "prettier": "^3.0.3", | ||||||
|     "pyright": "^1.1.317", |     "pyright": "1.1.393", | ||||||
|     "stylelint": "^15.10.3", |     "stylelint": "^15.10.3", | ||||||
|     "stylelint-config-standard": "^34.0.0", |     "stylelint-config-standard": "^34.0.0", | ||||||
|     "stylelint-prettier": "^4.0.2" |     "stylelint-prettier": "^4.0.2" | ||||||
|   | |||||||
| @@ -9431,10 +9431,10 @@ pupa@^3.1.0: | |||||||
|   dependencies: |   dependencies: | ||||||
|     escape-goat "^4.0.0" |     escape-goat "^4.0.0" | ||||||
|  |  | ||||||
| pyright@^1.1.317: | pyright@1.1.393: | ||||||
|   version "1.1.395" |   version "1.1.393" | ||||||
|   resolved "https://registry.npmjs.org/pyright/-/pyright-1.1.395.tgz#b10c5dda15c3b6281090bf3eb8f5a4c8d535a7a3" |   resolved "https://registry.npmjs.org/pyright/-/pyright-1.1.393.tgz#adb5a653777f806f533eff977635cca434c334e0" | ||||||
|   integrity sha512-QLu+YtuW3aL+pUTkzEJ2te0xfVAjSOd2KFkVy/xXTota7BrAQPtgXDnxfsbU8uzGT6OpCxF7HQaVWLV9OyRM/A== |   integrity sha512-v/pB9W2RXelj7Ye+3xTmsJdrgojcp77fQqE0Y+uXsSaRq5WQKgtLcuAE4tXF7YKSwSKmc4YiqlliZvp7OFh71w== | ||||||
|   optionalDependencies: |   optionalDependencies: | ||||||
|     fsevents "~2.3.3" |     fsevents "~2.3.3" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user