Closed chrisgoddard closed 7 months ago
I'll take a look, what I can do with it, but for now you should rename your class 'self' argument to smth else to not conflict with original 'self'. I used 'self__' inside lib
@chrisgoddard I found a solution, but now you should use CustomField in a new way (to support classes injection):
class Header(CustomField):
def use(
self,
/, # <- new thing
**kwargs: AnyDict
) -> AnyDict:
kwargs = super().use(**kwargs)
kwargs[self.param_name] = kwargs["headers"][self.param_name]
return kwargs
Old syntax works fine too, but doesn't support class case. All documentation was updated as well.
I've seen that positional-only syntax before and never really knew what it was for - so good to know! Thanks for responding quickly on this.
Seeing this error:
Raises this error: