8000 Render iterable views as section items by Aschenbath · Pull Request #134 · noahmorrison/chevron · GitHub
[go: up one dir, main page]

Skip to content

Render iterable views as section items - #134

Open
Aschenbath wants to merge 1 commit into
noahmorrison:mainfrom
Aschenbath:fix/iterable-section-59-20261120
Open

Aschenbath wants to merge 1 commit into
noahmorrison:mainfrom
Aschenbath:fix/iterable-section-59-20261120

Conversation

@Aschenbath
Copy link
Copy Markdown

Render dictionary views and reusable iterable objects as section items. The previous Sequence/Iterator check treated dict.values() and dict.keys() as a single value, producing the view's representation instead of rendering each item. Use Iterable, while preserving mappings and strings as single section contexts.

Fixes #59. Also addresses the iterable distinction discussed in #91; excluding mappings preserves the Mustache object-scope behavior.

Two regressions fail on the original source and the mapping/string/empty-view control passes. All 145 tests pass with the pinned Mustache specification submodule, including repeated use of a custom iterable. Core Flake8 findings match the unmodified base. Tested on Python 3.12; older supported Python versions were not run locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List rendering does not work with view objects

1 participant

0