PolicyEngine / PolicyEngine/policyengine-core
Replace `adds = "gov.x"` with `adds = "gov['x']` to address keyword issues
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 22
- Forks
- 30
- Avg merge
- 14h 33m
- Merged PRs (30d)
- 7
Description
For example see https://github.com/PolicyEngine/policyengine-us/pull/2815#discussion_r1292801346, where
adds = "gov.states.in.tax.income.credits.refundable"
breaks due to in being a keyword.
In advance of addressing paths with these keywords in general, we could parse them in the adds calls to replace all .x with ['x'] when parsing it.
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
Start by locating how adds calls are parsed, then reproduce the example path gov.states.in.tax.income.credits.refundable, which breaks because in is a keyword. Check the linked pull request discussion for context. Done means keyword-containing paths are accepted by converting dotted components such as .in to bracketed components such as ['in'].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100