Skip to content

Conversation

@jima80525
Copy link
Contributor

This is fixing an error I missed on a PR yesterday from an interested reader. Lesson learned - I should have tested it out before approving and not just relying on visual inspection. Apologies!

@jima80525 jima80525 requested review from dbader and gahjelle August 19, 2021 02:10
@gahjelle
Copy link
Contributor

The issue is the missing context parameter, right? As mentioned here: http://docs.pyinvoke.org/en/stable/getting-started.html#defining-and-running-task-functions

My guess is that it was removed in #213 because of a confusion as to what the name c was referring to? Which I guess is a bit particular for this repo since it deals with C code ...

I think this looks good. My one suggestion would be to use a more verbose name, ctx or even context, to avoid similar misunderstandings down the road.

@dbader
Copy link
Member

dbader commented Aug 19, 2021

Alright, thanks for the hotfix there :) I'll merge this now to fix the sample code (+1 to what @gahjelle suggested re: naming)

@dbader dbader merged commit 4fd6277 into master Aug 19, 2021
@dbader dbader deleted the jima/fixing_tasks_py_in_binding_article branch August 19, 2021 13:35
MiscStuff839 pushed a commit to MiscStuff839/materials that referenced this pull request Nov 16, 2025
…y_in_binding_article

Fixing error in tasks.py causing failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants