Describe the bug
Dependency Injection do not have exception when constructors don't return object. It be nice if constructors given exception warning when no returned object to warn ahead. But if no-return constructor on dependency injection is expected is also reasonable pattern because we could make if for example if context == null: do something. But i believe first pattern is better for other not stumble around null objects
To Reproduce
@dataclass
class ContextInjection:
request: Request
@classmethod
async def parse_htmx(cls, request: Request):
# I do something on header here for example
request.headers["header-X"] = true
cls(request)
Environment (please complete the following information):
Describe the bug Dependency Injection do not have exception when constructors don't return object. It be nice if constructors given exception warning when no returned object to warn ahead. But if no-return constructor on dependency injection is expected is also reasonable pattern because we could make if for example
if context == null: do something
. But i believe first pattern is better for other not stumble around null objectsTo Reproduce
Environment (please complete the following information):