Is it possible to extend the Context class's run method with my own?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reading the Context class and its run method, then review how command execution parameters are defined and passed. Determine whether supporting custom parameters is an intended API change or requires a documented extension mechanism; done should include a clear supported approach and coverage for the requested custom-argument behavior.
Written by the indexing model from the issue text.
Description
This might be more a general python question, but any tips would be great!
I want to add my own custom parameters to the context class's run method. I guess I could patch it, but wondering if there is a better supported way?
I want to be able to do this:
ctx.run("mycommand", hide=False, myCustomArg="somevalue")
So I can add my own functionality.
Is it possible to extend the Context class with my own and use my own class?
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 412
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyinvoke/invoke
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100