toml-sort

Toml sorting library

MIT License

Downloads
247K
Stars
89
Committers
11
toml-sort - Version 0.23.1 Latest Release

Published by pappasam over 1 year ago

Fixed

toml-sort - Version 0.23.0

Published by pappasam over 1 year ago

Added

Fixed

toml-sort - Version 0.22.4

Published by pappasam over 1 year ago

Fixed

  • Trailing whitespace is no longer added to blank comments
  • An issue where dotted keys raised a TypeError
toml-sort - Version 0.22.3

Published by pappasam almost 2 years ago

Fixed

toml-sort - Version 0.22.2

Published by pappasam almost 2 years ago

Added

  • New pre-commit hook (toml-sort-fix) that enables users to change, instead of check, their toml files.
toml-sort - Version 0.22.1

Published by pappasam almost 2 years ago

Fixed

toml-sort - Version 0.22.0

Published by pappasam almost 2 years ago

Release entirely related to this PR: https://github.com/pappasam/toml-sort/pull/33

Added

  • Optionally add the ability to sort inline tables and arrays. New switches added for this functionality: --sort-inline-tables and --sort-inline-arrays, which are implied by the existing --all option
  • New options groups to the CLI, to group the related formatting, comment, and sorting arguments
  • Switch to add trailing comma to multi-line inline arrays --trailing-comma-inline-array
  • Some additional formatting checks

Changed

  • Make sure inline arrays and tables are consistently formatted
  • Normalize the formatting for key = value pairs, always one space on either side of equals sign
toml-sort - Version 0.21.0

Published by pappasam almost 2 years ago

This is a pretty big comment-related release. Resolves the long-standing issue: https://github.com/pappasam/toml-sort/issues/11.

Changed

  • Header, Footer, and Block comments are retained by default and can be disabled with new CLI options.

Added

  • New CLI comment-removal options: --no-comments, --no-header-comments, --no-footer-comments, --no-inline-comments, --no-block-comments
  • The ability to configure spaces before inline comments with --spaces-before-inline-comment

Deprecated

  • The CLI option: --no-header. This will be removed in a future release and is replaced by --no-header-comments
toml-sort - Version 0.20.2

Published by pappasam almost 2 years ago

Fixed

toml-sort - Version 0.20.1

Published by pappasam about 2 years ago

Fixed

toml-sort - Version 0.20.0

Published by pappasam over 2 years ago

Added

  • Support configuring cli with pyproject.toml configuration file.

Changed

  • Moved CLI from click to argparse.
  • Update minimum version of tomlkit to 0.8.0. This drops support for Python 3.6.
toml-sort - Version 0.19.0

Published by pappasam over 3 years ago

Added

  • CLI option to ignore case while sorting
toml-sort - Version 0.18.0

Published by pappasam over 4 years ago

0.18.0

Note: in this release, we've discovered a strange bug (we believe in tomlkit) where, sometimes, AOT elements are ordered without our consent. One of the cli tests has been marked xfail. If you'd like to help figure out why, we're always looking for contributors!

Added

  • Support for multiple FILENAME arguments in the CLI. Used for precommit / linting multiple files. Thanks @atugushev!
  • Pre-commit hook

Changed

  • Provide more-comprehensive error messages for interactive CLI usage.
toml-sort - Version 0.17.0

Published by pappasam almost 5 years ago

Added

  • This CHANGELOG.md

Changed

  • tomlkit>=0.5.8. Upstream library made some important fixes.
  • Add isort, make part of pre-commit pipeline

Fixed

  • mypy, pylint, black, and isort all pass.

Removed

  • AOT workaround in AOT parser. Latest version of tomlkit no longer spits out duplicate elements for AOT.
toml-sort - Readme bug fixes

Published by pappasam about 5 years ago

toml-sort - Add "in-place" and "check" options

Published by pappasam about 5 years ago

  • --check: makes toml-sort usable as a linter. Will simply return non-zero status code if a file needs to be formatted. Now you can use this with pre-commit!
  • --in-place: from the command line, you can now format a toml file in-place.
toml-sort - Add shields to docs

Published by pappasam about 5 years ago

Not a functional release; just adds pypi shields to the readme.

toml-sort - Fix bug involving weird sort order of nested tables

Published by pappasam about 5 years ago

Also, tidies up the containers special case, handling in one place
and simplifying the type interface to only be Item

toml-sort - Fix Container Bug

Published by pappasam about 5 years ago

An edge case involving AoT's returns a Container, not an Item, while recursing. This PR re-adds the Union[Item, Container] handling and adds a test for the case.

It also improves the README.

toml-sort - Option to not print header

Published by pappasam about 5 years ago

Add command line option to not print a document's leading comments.

Also, simplifies / shortens the help message (it was too long before)