emit warning when a block or def is named "body"
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 459
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by Bérenger Enselme (@benselme)
This is using CPython 3.6.1
from mako.template import Template
if __name__ == '__main__':
s = Template("""aaaa<%block name="bodi"></%block>bbbb""").render()
assert s == 'aaaabbbb' # success
s = Template("""aaaa<%block name="body"></%block>bbbb""").render()
assert s == 'aaaabbbb' # failure, s == '\n '
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
Reproduce the supplied Template example first and compare the output for block names "bodi" and "body". Trace how Template processes block and def names, then verify that naming either one "body" emits a warning while rendering still produces the expected content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100