Skip to content

Fix: 声明为 str 的配置项在 dotenv 中写为纯数字时在 Pydantic 2 下的解析错误 #831

Fix: 声明为 str 的配置项在 dotenv 中写为纯数字时在 Pydantic 2 下的解析错误

Fix: 声明为 str 的配置项在 dotenv 中写为纯数字时在 Pydantic 2 下的解析错误 #831

Triggered via pull request July 6, 2024 12:49
Status Failure
Total duration 38s
Artifacts

pyright.yml

on: pull_request
Matrix: Pyright Lint
Fit to window
Zoom out
Zoom in

Annotations

6 errors
Pyright Lint (pydantic-v2): nonebot/typing.py#L90
Second argument to "issubclass" must be a class or tuple of classes   "Annotated" is not supported for instance and class checks (reportArgumentType)
Pyright Lint (pydantic-v2): nonebot/internal/driver/combine.py#L22
Overloaded implementation is not consistent with signature of overload 2   Type "(driver: type[D@combine_driver], *mixins: type[Mixin]) -> (type[D@combine_driver] | type[CombinedDriver])" is incompatible with type "(driver: type[D@combine_driver], _m: type[Mixin], *mixins: type[Mixin]) -> type[CombinedDriver]"     Missing keyword parameter "_m" (reportInconsistentOverload)
Pyright Lint (pydantic-v2)
2 errors
Pyright Lint (pydantic-v1): nonebot/typing.py#L90
Second argument to "issubclass" must be a class or tuple of classes   "Annotated" is not supported for instance and class checks (reportArgumentType)
Pyright Lint (pydantic-v1): nonebot/internal/driver/combine.py#L22
Overloaded implementation is not consistent with signature of overload 2   Type "(driver: type[D@combine_driver], *mixins: type[Mixin]) -> (type[D@combine_driver] | type[CombinedDriver])" is incompatible with type "(driver: type[D@combine_driver], _m: type[Mixin], *mixins: type[Mixin]) -> type[CombinedDriver]"     Missing keyword parameter "_m" (reportInconsistentOverload)
Pyright Lint (pydantic-v1)
2 errors