QoL: if parser should accept known symbols for its case
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 5
Description
Like
import flowrep as fr
def identity(x):
return x
@fr.workflow
def macro(x, y, z):
if x:
w = identity(y)
else:
w = identity(z)
return w
Currently you need an identity wrapper like if identity(x).
Under the hood, the recipe still expects an operation for the case, and I can tolerate that, I'd be content if it just auto-inserted the identity operation at parsing time so I can write more straightforward python.
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 the parser used by the @fr.workflow decorator and the handling of if cases. Reproduce the example without the identity wrapper, then trace how the recipe represents the case operation. Done means the parser accepts known symbols directly while preserving the expected operation in the recipe; add or update parser tests if the project has them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100