GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Fix CLI declarations that disagree with runtime behaviour by tony · Pull Request #1082 · tmux-python/tmuxp Conversation
Member
Summary
Each was found while documenting these classes: writing an accurate description of a field is what exposed that the field's declaration and its runtime behaviour disagreed. Based on Changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## class-variables #1082 +/- ## =================================================== - Coverage 82.55% 82.53% -0.02% =================================================== Files 31 31 Lines 2768 2766 -2 Branches 518 518 =================================================== - Hits 2285 2283 -2 Misses 346 346 Partials 137 137 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
64cc513 to
6338d84
Compare
why: Three statements freeze makes about itself were wrong. --quiet advertised skipping confirmation, but it only gates informational output -- confirmations still run, and --yes is what skips them. --force advertised overwriting the workspace file, but it only relaxes the existence check inside the interactive destination prompt, so it does nothing when -o is given. save_to was typed str | None while -o parses with type=pathlib.Path. what: - Reword the --quiet and --force help to what each one does, and point --quiet at --yes for the behaviour it used to claim - Type save_to as pathlib.Path | None and convert at the one place the destination becomes a string - Pin all three with tests built from create_freeze_subparser
why: CLIColorsLiteral admitted 56, a value nothing produces. The -2 flag stores 256, so the type excluded the very value its own flag assigns and admitted one that cannot occur. what: - Declare CLIColorsLiteral as Literal[256, 88]
why: Three namespace fields were declared for flags that do not exist. The shell subparser defines no -2/-8 and no --log-file, and --version uses argparse's version action, which prints and exits with dest suppressed. Reading any of them raises AttributeError, so the annotations described a surface no caller could use. what: - Remove colors and log_file from CLIShellNamespace, and the colour literal left unused by their removal - Remove version from CLINamespace
6338d84 to
e9ed40a
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.