github tox-dev/toml-fmt tox-toml-fmt/1.10.0

2 hours ago

Changed

  • env_list keeps the order the file wrote it in. That list is the order tox runs the environments in: it feeds the sequential runner and decides where a fail-fast run stops, so sorting it changed what the file said. --pin-env still moves the environments it names to the front, of both the list and the tables. (#448)
  • A string measures from the start of its key. A long key can be what pushes a value past column_width; measuring the value alone left lines running past the column the setting asks for. (#448)
  • Deep input comes back as an error rather than a crash. Reading a value, writing it and dropping it each walk it by calling themselves, so the model caps nesting at 256 levels. A 12,000-deep value used to end the process. (#448)

Fixed

  • An environment whose name the file quoted follows env_list. [env."3.14"] is the environment the list names as "3.14", and comparing the quoted key against the plain name never said so, so its table fell in with the environments the list does not name at all. (#448)
  • A deps list holding a pip option, path or URL keeps its order. pip reads that list the way it reads a requirements file, where a later --index-url replaces the one before it, so the order carries meaning. Every requirement beside such an entry still normalizes. (#448)
  • A set_env table keeps the order the file wrote it in. tox reads the table in order, so a key written after file overrides what that file said and a key written before it does not; alphabetizing the table changed which value won. (#448)
  • use_develop = true beside a package key gives package the mode the environment ran with. tox reads use_develop first and installs an editable package whatever package says; dropping the older key and keeping package = "sdist" changed the install. (#448)
  • A nested array closes its last member with the comma the outer form writes. (#448)
  • A literal string sorts with the values around it. 'zz' and 'aa' held their order while the same values in double quotes sorted. (#448)
  • A comment written before a member's comma stays on that member's line. The comma is what says which member a comment belongs to: one written before it closes that member's line, one written after it leads the next member. Both used to end up on a line of their own, leaving the comma stranded below. (#448)

Performance

  • The quadratic walks the old parse tree forced are gone. 800 environments, each with one sub-table, took 18.6 seconds and now take 0.12; scaling is close to linear. (#448)

Don't miss a new toml-fmt release

NewReleases is sending notifications on new releases.