palantir / palantir/conjure-python
Force use of keyword arguments in method calls
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 27
- Forks
- 19
- Avg merge
- 12h 22m
- Merged PRs (30d)
- 15
Description
Method signatures are unstable due to a side effect of the implementation of https://github.com/palantir/conjure-python/pull/14. In order to prevent difficult to debug breaks we should force keyword arguments to be used.
This can be supported out of the box in Python 3:
def fun(*, arg1, arg2):
pass
But we'll have to get creative for backcompat with Python 2:
def fun(*args, arg1, arg2):
if args:
raise ValueError("...")
@ferozco
cc @JacekLach, @jamding
Contributor guide
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.
Research direction
Review the implementation changes from pull request 14 and locate the generator code that emits Python client method signatures. Determine a Python 2-compatible way to reject positional arguments without breaking supported compatibility. Done means generated methods consistently require keyword arguments and tests cover the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100