Skip to content

Add annotating decorator #19

Description

@emptybutton

Need to implement the following functionality for centralized annotating:

...

Send = Callable[str, bool]
User = type(name=str, age=int)


@Is[Send]
def send_via_email(message: str) -> bool:
    ...


@Is[User]
@obj
class chingzhenmen:
    name = "Chingzhenmen"
    age = 24

    def do_chingzhenmen(self) -> ...:
        ...


# To avoid:
# send_via_email: Send
# chingzhenmen: User

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsannotations.pydocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions