-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement named/pos_args annotation methods #7694
Implement named/pos_args annotation methods #7694
Conversation
Good for review again @bcardiff @straight-shoota |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but it needs a rebase on master to make the CI happy
79d7283
to
7c89b71
Compare
Imo |
Thinking of this more, the challenge with returning them both would be how to do that, since they are of different "types". Could have |
7c89b71
to
b49f8df
Compare
@bcardiff @bew @straight-shoota Could you review this again? I added
So now it's possible to get positional arguments, named arguments, or both off of an annotation. |
I'd prefer not to return a named tuple, no other macro methods behave like this. I'm a bit lost to the usecase of |
@RX14 I'd also be fine with removing |
@Blacksmoke16 that would be great. In fact, I'd just name |
Using only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, I would like to see a more structured API for annotations. I don't think this will be a definitive API for this. But is serves for now. So, to be used it with caution :-)
Works for me. This is a big improvement over my current hack I'm using :P |
Thank you @Blacksmoke16 |
Resolves #7692.
Adds
#named_args
and#args
methods toAnnotation
.