-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Automatically handle different signatures in Callable #1260
Conversation
holoviews/core/util.py
Outdated
methods, classmethods and partials. | ||
|
||
Note that the args list for instance and class methods are those as | ||
seen by the user. In other words, the first argument with is |
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.
s/with/which?
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.
Thanks. Fixed in 51a1016
Thanks for doing this! |
holoviews/core/spaces.py
Outdated
kwargs = dict(flattened, **dict(zip(self._posarg_keys, args))) | ||
args = () | ||
else: | ||
kwargs = dict(flattened) |
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.
No reason to have this inside the context manager as far as I can tell.
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.
Agreed. I just did this because I wanted to be close to the actual call when I wrote it.
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.
Addressed in 50022df
I think this is ready to merge once the tests pass. As ever, the new functionality needs to be documented in the tutorials, but that is outside the scope of this PR. |
Agreed, but in the future after we've released 2.0 and overhauled our docs, I'd say that every feature PR should update be documented as a pre-requisite for being merged. |
That would be a good policy for the future and we should codify it at some point (e.g when we decide on a PR template). Right now it doesn't make sense as the tutorials relating to DynamicMap need a complete overhaul. |
Looks good, those unit tests cover all the cases I can think of so I'm happy to merge. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR aims to address #1189. The goal is to make
Callable
very flexible in what it accepts when it dispatches args and kwargs to the callback. This should mean that DynamicMap can accept almost any sensible callback.Action items