-
Notifications
You must be signed in to change notification settings - Fork 284
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
enable meta.delegates to enforce KEYWORD_ONLY for kwargs from #459
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Many thanks for the PR. I've made one suggested change (but haven't tested it -- so take a look and see if it works for you!).
You've accidentally added the whole _docs directory to your PR. Could you please remove it? I've just updated .gitignore so that this shouldn't happen again in the future.
fastcore/meta.py
Outdated
@@ -120,20 +120,21 @@ def _f(f): | |||
k = sigd.pop('kwargs') | |||
s2 = {k:v for k,v in inspect.signature(to_f).parameters.items() |
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.
s2 = {k:v for k,v in inspect.signature(to_f).parameters.items() | |
s2 = {k:v.replace(kind=inspect.Parameter.KEYWORD_ONLY) for k,v in inspect.signature(to_f).parameters.items() |
If you made this change, would that mean you could then remove the line you added?
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.
Yes, this change works and my added line can be removed. Thanks Jeremy!
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.
Great. Just reply here when you've removed the _docs
folder and we should be ready to go!
I have reverted my first troublesome commit and then only run |
Good job! |
Thank you Jeremy! This is my first contribution to fastcore, Wow! |
The details of this PR can be found in this forum thread.