-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add `trailing_commas` to `dump`/`dumps` Add an optional boolean argument `trailing_commas` to the `dump` and `dumps` methods in `simpleion`. Default: False. When `trailing_commas=True`, and when `indent` is not `None`, this causes `dump[s]` to include a comma on the last item in a container. **Note:** Since the C module already **does not support pretty printing**, this flag does nothing when using the C module. * fix: Fix test errors for trailing_commas test additions * fix: trailing_commas: fix tests & only when indent set Make the `trailing_commas` flag do what it says: Only apply when pretty printing (`indent is not None`). Fix all remaining `test_simpleion.py` failures. * fix: Remove accidentally left-in debugging-aid comment * fix: Remove accidental trailing_commas inclusion in dump_extension() --------- Co-authored-by: Stephen Jacob <[email protected]>
- Loading branch information
Showing
4 changed files
with
98 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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