-
Notifications
You must be signed in to change notification settings - Fork 371
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
Error on passing task to other task #376
Comments
pre
Huh, interesting, I think this is because the value you're passing in the signature of Perhaps more deeply, |
Hi, while testing/researching inspect.Signature for #357, I also came across this issue. I'm still making my way through the codebase
I suspect 1 is the better solution, but I don't know Invoke well enough to be sure. Either way, this is indeed "Low-hanging Fruit", and I've got a pull request-able branch (with updated tests) for both approaches.
|
Add type checking so that only a Task instances can potentially equal another Task instance. Same logic apply to Call instances. Fixes pyinvoke#376
I've figured out how to properly debug Invoke tasks and located the root cause. Turns out there is nothing complicated about this issue :-) Task.arg_opts simply tries to infer the type of the default value, but first it checks to make sure that the default is not None. If the default happens to be a Task instance, this check calls it's eq method, which breaks because it can't deal with anything else besides a Task instance (or more precisely, an object with a 'name' and a 'body' attribute). I've opened a pull request that fixes this issue for your review. |
Thanks @jr-minnaar - will look that over when I get to wrapping up 0.12.3. |
Rolling into #906 which includes the fix and a changelog entry for this issue. |
spits out
I was originally doing something really dumb because I didn't understand how invoke worked, but I came across this weird case. Feel free to close this.
The text was updated successfully, but these errors were encountered: