Opt-in errors when a parameter is missing, or an unused parameter is passed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 59
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that missing parameters are rendered as empty strings.
```
>>> ashes_env.register_source('hello', 'Hello, {name}!')
>>> ashes_env.render('hello', {})
'Hello, !'
```
It would be nice if it was possible to opt-in to errors. My use case is that I want to test that I am not passing the wrong parameters for a template.
Thanks in advance, I like the library.
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.
Research direction
Start by reproducing the missing-parameter example in the issue and trace the template rendering path that handles parameters. Define the opt-in behavior for missing and unused parameters while preserving the current default behavior, then add tests covering both cases and the existing empty-string rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100