Repository navigation
Handle omitted data and stdin data in command-line rendering - #136
Open
Aschenbath wants to merge 1 commit into
Open
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #77 and #124.
chevron template.mustache --data -now reads data from standard input through the existing JSON/YAML loader. The dash is special only for the data argument, so the template remains a file and both arguments cannot consume the same stream. Standard input is left open.Omitting
--datanow passesNonetomain(), which already supports an empty data object. Previously argparse supplied{}, andmain()tried to open that dictionary as a filename, raisingTypeError.Add command-line and API regressions for stdin, omitted data, invalid paths, and stdin ownership, plus the usage example. The prescribed
python test_spec.pyrunner passes all 147 tests, including the pinned Mustache specification tests, on Python 3.12 / Windows. Three new cases fail on the unchanged source. Flake8 adds no diagnostics over the four existing changed-file diagnostics. Other Python versions were not run.Developed and tested with OpenAI Codex assistance.