Skip to content

Add Annotation to CustomField instanceΒ #167

@pbrochar

Description

@pbrochar

Hello,

Thanks for this library. I want to access to the Annotation parameters inside the use function of a CustomField subclass.

class Custom(CustomField):
    param_name: str

    def use(self, /, *,  **kwargs: Dict[str, Any]) -> Dict[str, Any]:
       self.param_type # Here I want access to the parameter type
       ...

Where my function is:

def func(a: int, b: Annotated[str | None, Custom()]):
    ....

Is it possible ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions