I've noticed several type errors in examples. For example:
It is a type error, because data.update_instance
expects T=Person
) and we give it T=Person | None
from .get
I've checked, there are 99 type errors in examples right now:
» pdm run mypy docs/examples
docs/examples/websockets/listener_class_based_async.py:8: error: Signature of "on_accept" incompatible with supertype "WebsocketListener" [override]
docs/examples/websockets/listener_class_based_async.py:8: note: Superclass:
docs/examples/websockets/listener_class_based_async.py:8: note: Optional[Callable[..., Any]]
docs/examples/websockets/listener_class_based_async.py:8: note: Subclass:
docs/examples/websockets/listener_class_based_async.py:8: note: def on_accept(self, socket: WebSocket[Any, Any, Any]) -> Coroutine[Any, Any, None]
docs/examples/websockets/listener_class_based_async.py:11: error: Signature of "on_disconnect" incompatible with supertype "WebsocketListener" [override]
docs/examples/websockets/listener_class_based_async.py:11: note: Superclass:
docs/examples/websockets/listener_class_based_async.py:11: note: Optional[Callable[..., Any]]
docs/examples/websockets/listener_class_based_async.py:11: note: Subclass:
docs/examples/websockets/listener_class_based_async.py:11: note: def on_disconnect(self, socket: WebSocket[Any, Any, Any]) -> Coroutine[Any, Any, None]
docs/examples/websockets/listener_class_based.py:8: error: Signature of "on_accept" incompatible with supertype "WebsocketListener" [override]
docs/examples/websockets/listener_class_based.py:8: note: Superclass:
docs/examples/websockets/listener_class_based.py:8: note: Optional[Callable[..., Any]]
docs/examples/websockets/listener_class_based.py:8: note: Subclass:
docs/examples/websockets/listener_class_based.py:8: note: def on_accept(self, socket: WebSocket[Any, Any, Any]) -> None
docs/examples/websockets/listener_class_based.py:11: error: Signature of "on_disconnect" incompatible with supertype "WebsocketListener" [override]
docs/examples/websockets/listener_class_based.py:11: note: Superclass:
docs/examples/websockets/listener_class_based.py:11: note: Optional[Callable[..., Any]]
docs/examples/websockets/listener_class_based.py:11: note: Subclass:
docs/examples/websockets/listener_class_based.py:11: note: def on_disconnect(self, socket: WebSocket[Any, Any, Any]) -> None
docs/examples/websockets/dependency_injection_yield.py:13: error: The return type of a generator function should be "Generator" or one of its supertypes [misc]
docs/examples/websockets/custom_websocket.py:8: error: Signature of "receive_data" incompatible with supertype "WebSocket" [override]
docs/examples/websockets/custom_websocket.py:8: note: Superclass:
docs/examples/websockets/custom_websocket.py:8: note: @overload
docs/examples/websockets/custom_websocket.py:8: note: def receive_data(self, mode: Literal['text']) -> Coroutine[Any, Any, str]
docs/examples/websockets/custom_websocket.py:8: note: @overload
docs/examples/websockets/custom_websocket.py:8: note: def receive_data(self, mode: Literal['binary']) -> Coroutine[Any, Any, bytes]
docs/examples/websockets/custom_websocket.py:8: note: Subclass:
docs/examples/websockets/custom_websocket.py:8: note: def receive_data(self, mode: Literal['text', 'binary']) -> Coroutine[Any, Any, Union[str, bytes]]
docs/examples/todo_app/update.py:21: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/todo_app/full_app.py:21: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/static_files/full_example.py:9: error: Function is missing a return type annotation [no-untyped-def]
docs/examples/static_files/full_example.py:9: note: Use "-> None" if function does not return a value
docs/examples/responses/response_content.py:16: error: Argument "content" to "Response" has incompatible type "Optional[bytes]"; expected "bytes" [arg-type]
docs/examples/request_data/custom_request.py:19: error: Argument 1 to "get" of "dict" has incompatible type "Union[HttpMethod, Any, Literal['GET', 'POST', 'DELETE', 'PATCH', 'PUT', 'HEAD', 'TRACE', 'OPTIONS']]"; expected "HttpMethod" [arg-type]
docs/examples/request_data/custom_request.py:19: error: TypedDict "WebSocketScope" has no key "method" [typeddict-item]
docs/examples/plugins/di_plugin.py:10: error: Function is missing a type annotation [no-untyped-def]
docs/examples/plugins/di_plugin.py:26: error: Returning Any from function declared to return "str" [no-any-return]
docs/examples/parameters/path_parameters_3.py:29: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/middleware/call_order.py:34: error: Returning Any from function declared to return "List[int]" [no-any-return]
docs/examples/dependency_injection/dependency_non_optional_not_provided.py:10: error: "dict" is not subscriptable, use "typing.Dict" instead [misc]
docs/examples/data_transfer_objects/factory/patch_requests.py:33: error: Argument 1 to "update_instance" of "DTOData" has incompatible type "Optional[Person]"; expected "Person" [arg-type]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_session_di.py:63: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_session_di.py:78: error: Incompatible return value type (got "Sequence[TodoItem]", expected "List[TodoItem]") [return-value]
docs/examples/templating/template_functions_mako.py:11: error: Returning Any from function declared to return "str" [no-any-return]
docs/examples/templating/template_functions_mako.py:17: error: Argument "template_callable" to "register_template_callable" of "MakoTemplateEngine" has incompatible type "Callable[[Dict[str, Any]], str]"; expected "Callable[[Mapping[str, Any]], str]" [arg-type]
docs/examples/templating/template_functions_mako.py:17: note: This is likely because "my_template_function" has named arguments: "ctx". Consider marking them positional-only
docs/examples/templating/template_functions_jinja.py:11: error: Returning Any from function declared to return "str" [no-any-return]
docs/examples/templating/template_functions_jinja.py:17: error: Argument "template_callable" to "register_template_callable" of "JinjaTemplateEngine" has incompatible type "Callable[[Dict[str, Any]], str]"; expected "Callable[[Mapping[str, Any]], str]" [arg-type]
docs/examples/templating/template_functions_jinja.py:17: note: This is likely because "my_template_function" has named arguments: "ctx". Consider marking them positional-only
docs/examples/templating/returning_templates_minijinja.py:12: error: Missing return statement [return]
docs/examples/templating/returning_templates_mako.py:12: error: Missing return statement [return]
docs/examples/templating/returning_templates_jinja.py:10: error: Missing return statement [return]
docs/examples/stores/namespacing.py:13: error: Unexpected keyword argument "before_shutdown" for "Litestar"; did you mean "on_shutdown"? [call-arg]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:37: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:47: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:130: error: "list" is not subscriptable [misc]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:202: error: "object" not callable [operator]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:203: error: "object" not callable [operator]
docs/examples/contrib/sqlalchemy/sqlalchemy_sync_repository.py:215: error: "object" not callable [operator]
docs/examples/contrib/sqlalchemy/sqlalchemy_repository_bulk_operations.py:19: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/sqlalchemy/sqlalchemy_repository_bulk_operations.py:68: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/piccolo/app.py:36: error: Incompatible return value type (got "List[Dict[str, Any]]", expected "List[Task]") [return-value]
docs/examples/contrib/piccolo/app.py:36: error: "Type[Task]" has no attribute "id" [attr-defined]
docs/examples/contrib/piccolo/app.py:60: error: "Type[Task]" has no attribute "id" [attr-defined]
docs/examples/contrib/piccolo/app.py:70: error: "Type[Task]" has no attribute "id" [attr-defined]
docs/examples/contrib/piccolo/app.py:76: error: Function is missing a return type annotation [no-untyped-def]
docs/examples/contrib/piccolo/app.py:76: note: Use "-> None" if function does not return a value
docs/examples/middleware/session/cookies_full_example.py:9: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/middleware/session/cookie_backend.py:6: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/prometheus/using_prometheus_exporter_with_extra_configs.py:40: error: Argument "labels" to "PrometheusConfig" has incompatible type "Dict[str, object]"; expected "Optional[Mapping[str, Union[str, Callable[..., Any]]]]" [arg-type]
docs/examples/contrib/prometheus/using_prometheus_exporter_with_extra_configs.py:41: error: Argument "buckets" to "PrometheusConfig" has incompatible type "List[float]"; expected "Optional[List[Union[str, float]]]" [arg-type]
docs/examples/contrib/prometheus/using_prometheus_exporter_with_extra_configs.py:41: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
docs/examples/contrib/prometheus/using_prometheus_exporter_with_extra_configs.py:41: note: Consider using "Sequence" instead, which is covariant
docs/examples/contrib/prometheus/using_prometheus_exporter.py:5: error: Function is missing a return type annotation [no-untyped-def]
docs/examples/security/using_session_auth.py:71: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[bytes]") [assignment]
docs/examples/security/using_session_auth.py:81: error: Invalid index type "bytes" for "Dict[str, User]"; expected type "str" [index]
docs/examples/data_transfer_objects/factory/type_checking.py:12: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/type_checking.py:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/type_checking.py:12: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/type_checking.py:18: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/type_checking.py:18: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/type_checking.py:18: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/simple_dto_factory_example.py:11: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/simple_dto_factory_example.py:11: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/simple_dto_factory_example.py:11: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/response_return_data.py:12: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/response_return_data.py:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/response_return_data.py:12: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/response_return_data.py:19: error: Incompatible types in assignment (expression has type "DTOConfig", base class "SQLAlchemyDTO" defined the type as "SQLAlchemyDTOConfig") [assignment]
docs/examples/data_transfer_objects/factory/renaming_fields.py:13: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/renaming_fields.py:13: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/renaming_fields.py:13: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/renaming_all_fields.py:13: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/renaming_all_fields.py:13: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/renaming_all_fields.py:13: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/related_items.py:16: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/related_items.py:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/related_items.py:16: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/related_items.py:21: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/related_items.py:21: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/related_items.py:21: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/paginated_return_data.py:13: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/paginated_return_data.py:13: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/paginated_return_data.py:13: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/paginated_return_data.py:20: error: Incompatible types in assignment (expression has type "DTOConfig", base class "SQLAlchemyDTO" defined the type as "SQLAlchemyDTOConfig") [assignment]
docs/examples/data_transfer_objects/factory/marking_fields.py:12: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/marking_fields.py:12: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/marking_fields.py:12: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/included_fields.py:16: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/included_fields.py:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/included_fields.py:16: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/included_fields.py:23: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/included_fields.py:23: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/included_fields.py:23: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/included_fields.py:28: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/included_fields.py:28: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/included_fields.py:28: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/excluding_fields.py:16: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/excluding_fields.py:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/excluding_fields.py:16: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/excluding_fields.py:23: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/excluding_fields.py:23: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/excluding_fields.py:23: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/excluding_fields.py:28: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/excluding_fields.py:28: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/excluding_fields.py:28: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/enveloping_return_data.py:22: error: Variable "examples.data_transfer_objects.factory.my_lib.Base" is not valid as a type [valid-type]
docs/examples/data_transfer_objects/factory/enveloping_return_data.py:22: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
docs/examples/data_transfer_objects/factory/enveloping_return_data.py:22: error: Invalid base class "Base" [misc]
docs/examples/data_transfer_objects/factory/enveloping_return_data.py:29: error: Incompatible types in assignment (expression has type "DTOConfig", base class "SQLAlchemyDTO" defined the type as "SQLAlchemyDTOConfig") [assignment]
docs/examples/contrib/sqlalchemy/sqlalchemy_repository_extension.py:152: error: "list" is not subscriptable [misc]
docs/examples/contrib/sqlalchemy/sqlalchemy_async_repository.py:41: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/sqlalchemy/sqlalchemy_async_repository.py:51: error: Unused "type: ignore" comment [unused-ignore]
docs/examples/contrib/sqlalchemy/sqlalchemy_async_repository.py:133: error: "list" is not subscriptable [misc]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: error: No overload variant of "select" matches argument type "int" [call-overload]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: Possible overload variants:
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], /) -> Select[Tuple[_T0]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], /) -> Select[Tuple[_T0, _T1]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], /) -> Select[Tuple[_T0, _T1, _T2]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], /) -> Select[Tuple[_T0, _T1, _T2, _T3]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any, _T8: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], Union[TypedColumnsClauseRole[_T8], SQLCoreOperations[_T8], Type[_T8]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any, _T8: Any, _T9: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], Union[TypedColumnsClauseRole[_T8], SQLCoreOperations[_T8], Type[_T8]], Union[TypedColumnsClauseRole[_T9], SQLCoreOperations[_T9], Type[_T9]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:22: note: def select(*entities: Union[TypedColumnsClauseRole[Any], ColumnsClauseRole, SQLCoreOperations[Any], Literal['*', 1], Type[Any], Inspectable[_HasClauseElement[Any]], _HasClauseElement[Any]], **Any) -> Select[Any]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_sync_dependencies.py:24: error: Incompatible return value type (got "Tuple[Optional[Any], Optional[Any]]", expected "Tuple[int, int]") [return-value]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: error: No overload variant of "select" matches argument type "int" [call-overload]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: Possible overload variants:
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], /) -> Select[Tuple[_T0]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], /) -> Select[Tuple[_T0, _T1]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], /) -> Select[Tuple[_T0, _T1, _T2]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], /) -> Select[Tuple[_T0, _T1, _T2, _T3]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any, _T8: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], Union[TypedColumnsClauseRole[_T8], SQLCoreOperations[_T8], Type[_T8]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def [_T0: Any, _T1: Any, _T2: Any, _T3: Any, _T4: Any, _T5: Any, _T6: Any, _T7: Any, _T8: Any, _T9: Any] select(Union[TypedColumnsClauseRole[_T0], SQLCoreOperations[_T0], Type[_T0]], Union[TypedColumnsClauseRole[_T1], SQLCoreOperations[_T1], Type[_T1]], Union[TypedColumnsClauseRole[_T2], SQLCoreOperations[_T2], Type[_T2]], Union[TypedColumnsClauseRole[_T3], SQLCoreOperations[_T3], Type[_T3]], Union[TypedColumnsClauseRole[_T4], SQLCoreOperations[_T4], Type[_T4]], Union[TypedColumnsClauseRole[_T5], SQLCoreOperations[_T5], Type[_T5]], Union[TypedColumnsClauseRole[_T6], SQLCoreOperations[_T6], Type[_T6]], Union[TypedColumnsClauseRole[_T7], SQLCoreOperations[_T7], Type[_T7]], Union[TypedColumnsClauseRole[_T8], SQLCoreOperations[_T8], Type[_T8]], Union[TypedColumnsClauseRole[_T9], SQLCoreOperations[_T9], Type[_T9]], /) -> Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9]]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:21: note: def select(*entities: Union[TypedColumnsClauseRole[Any], ColumnsClauseRole, SQLCoreOperations[Any], Literal['*', 1], Type[Any], Inspectable[_HasClauseElement[Any]], _HasClauseElement[Any]], **Any) -> Select[Any]
docs/examples/contrib/sqlalchemy/plugins/sqlalchemy_async_dependencies.py:23: error: Incompatible return value type (got "Tuple[Optional[Any], Optional[Any]]", expected "Tuple[int, int]") [return-value]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_serialization_plugin.py:57: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_serialization_plugin.py:72: error: Incompatible return value type (got "Sequence[TodoItem]", expected "List[TodoItem]") [return-value]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_plugin.py:36: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_plugin.py:51: error: Incompatible return value type (got "Sequence[TodoItem]", expected "List[TodoItem]") [return-value]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_init_plugin.py:39: error: Function is missing a type annotation for one or more arguments [no-untyped-def]
docs/examples/contrib/sqlalchemy/plugins/tutorial/full_app_with_init_plugin.py:54: error: Incompatible return value type (got "Sequence[TodoItem]", expected "List[TodoItem]") [return-value]
Found 99 errors in 47 files (checked 315 source files)
What we can do better?
type: ignore
(because this is very important for docs, we cannot teach users adding ignores in many cases)What do others think? :)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too