Closed
Description
Hi there!
Quick question - is there a way to use this in the context of a class rather than a function?
Either within a method:
class Example:
@inject
def method(self, x = Depends(dependency)):
...
or class variable?
@inject
class Example:
x = Depends(dependency)
def method(self):
...
Right now, in the first example, I get the error TypeError: CallModel.solve() got multiple values for argument 'self'
(second example was just another idea - not expected behavior).
Love the library btw - thanks!
Metadata
Metadata
Assignees
Labels
No labels