Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add annotating decorator #19

Open
emptybutton opened this issue Nov 19, 2023 · 0 comments
Open

Add annotating decorator #19

emptybutton opened this issue Nov 19, 2023 · 0 comments
Labels
annotations annotations.py documentation Improvements or additions to documentation enhancement New feature or request

Comments

@emptybutton
Copy link
Owner

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
@emptybutton emptybutton added documentation Improvements or additions to documentation enhancement New feature or request annotations annotations.py labels Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations annotations.py documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant