You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a new test case. This is more of a Litestar problem, but still
Non-primitive objects cannot be overridden with any other type until we mark it with the Any annotation. Below is the code that will help reproduce this
@get(path="mock_overriding", dependencies={"some_service": Provide(DIContainer.some_service)})# does not works with some_service: SomeService type, but works with some_service: SomeService | Anyasyncdefmock_overriding_endpoint_handler(self, some_service: SomeService) ->dict[str, typing.Any]:
return {"object": some_service.do_smth()}
I found a new test case. This is more of a Litestar problem, but still
Non-primitive objects cannot be overridden with any other type until we mark it with the
Any
annotation. Below is the code that will help reproduce thisclass and container:
controller handler:
test:
error:
The text was updated successfully, but these errors were encountered: