Skip to content

1.1.3

Choose a tag to compare

@Solganis Solganis released this 15 Jul 04:55
dad2ddd

Bug fixes

  • docopt(__doc__): a flush-left usage block, as Python 3.13 leaves an inline docstring, now parses like an indented one
  • Shell completion: resolving candidates is now linear in the option count, so a Tab press on a many-flag [options] CLI no longer stalls
  • Shell completion: a command a typed option has ruled out (it belongs to another usage line) is no longer offered
  • Typed results: an int/float-valued Literal or IntEnum now coerces the argv string to the choice's type instead of rejecting it
  • Typed results: a leading-underscore field (from <_x>) now binds, like it already does on a dataclass
  • allow_extra: a surplus valued option keeps its value in extra (--log out.txt, not a bare --log)
  • Layered fallback: an [env:]/[config:] value on a repeating counted flag stays an int count, not a bool
  • config-template: a numeric default like 1.10 is quoted so it round-trips instead of loading back as 1.1
  • config-template: a [config:] key with an empty segment (a stray dot) is rejected, not emitted as invalid TOML
  • check_compat: a subcommand generalized to a positional is no longer a false "removed" break (the new usage accepts a superset)
  • format_usage: a whitespace-only spacer line in Options: is left intact, so fmt stays semantics-preserving and idempotent
  • Rich --help: a clustered short like [-hso] now lists -h/-s/-o instead of hiding them
  • Rich --help: a scoped [options] lists only the options that command accepts, not another line's
  • Rich --help: a flag's [default:], which docopt ignores, is no longer shown
  • Subcommand dispatch: a schema coercion failure now carries the usage block and the caller's exit_code
  • CLI: a .py or text source with a UTF-8 BOM (common on Windows) is now read, not rejected

Internal

  • A corpus of real-world usage messages drives every public entry point in the suite
  • New property tests pin two invariants: every entry point raises only its own errors, and completion stays linear in the option count