cmd2 4.0.0b1__tar.gz → 4.0.0b3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/.pre-commit-config.yaml +16 -1
- cmd2-4.0.0b3/.typos.toml +5 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/CHANGELOG.md +61 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/Makefile +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/PKG-INFO +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/README.md +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/__init__.py +52 -40
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/argparse_completer.py +156 -127
- cmd2-4.0.0b3/cmd2/argparse_utils.py +847 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/cmd2.py +775 -590
- cmd2-4.0.0b3/cmd2/command_set.py +137 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/completion.py +60 -35
- cmd2-4.0.0b3/cmd2/constants.py +100 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/decorators.py +149 -130
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/history.py +19 -19
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/parsing.py +43 -43
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/pt_utils.py +22 -19
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/py_bridge.py +4 -4
- cmd2-4.0.0b3/cmd2/rich_utils.py +756 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/string_utils.py +24 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/styles.py +7 -1
- cmd2-4.0.0b3/cmd2/types.py +113 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/utils.py +41 -40
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.egg-info/PKG-INFO +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.egg-info/SOURCES.txt +7 -7
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.egg-info/requires.txt +2 -2
- cmd2-4.0.0b3/docs/api/argparse_utils.md +3 -0
- cmd2-4.0.0b3/docs/api/command_set.md +3 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/index.md +3 -3
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/doc_conventions.md +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/argument_processing.md +20 -24
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/completion.md +3 -3
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/generating_output.md +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/help.md +56 -30
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/initialization.md +9 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/misc.md +4 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/modular_commands.md +98 -52
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/migrating/next_steps.md +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/README.md +5 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/argparse_completion.py +17 -17
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/argparse_example.py +38 -39
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/async_call.py +5 -5
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/async_commands.py +6 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/async_printing.py +15 -15
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/basic_completion.py +7 -7
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/cmd_as_argument.py +22 -22
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/color.py +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/command_sets.py +41 -39
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/custom_parser.py +7 -7
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/custom_types.py +10 -10
- cmd2-4.0.0b3/examples/default_categories.py +68 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/dynamic_commands.py +3 -3
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/environment.py +5 -5
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/event_loops.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/exit_code.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/getting_started.py +14 -19
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/hello_cmd2.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/help_categories.py +34 -34
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/hooks.py +6 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/migrating.py +6 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/mixin.py +3 -3
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/modular_commands/commandset_basic.py +15 -13
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/modular_commands/commandset_complex.py +17 -15
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/modular_commands/commandset_custominit.py +8 -5
- cmd2-4.0.0b1/examples/modular_commands.py → cmd2-4.0.0b3/examples/modular_commandsets.py +6 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/paged_output.py +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/persistent_history.py +3 -3
- cmd2-4.0.0b3/examples/pretty_print.py +28 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/python_scripting.py +14 -14
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/read_input.py +35 -8
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/remove_builtin_commands.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/remove_settable.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/rich_tables.py +13 -18
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/conditional.py +10 -10
- cmd2-4.0.0b3/examples/scripts/save_help_text.py +107 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/unicode_commands.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/mkdocs.yml +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/pyproject.toml +4 -4
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/ruff.toml +2 -5
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/scripts/validate_tag.py +5 -5
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/conftest.py +6 -20
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/echo.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/environment.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/help.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/raises_exception.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/recursive.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/self_in_py.py +1 -1
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/stop.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_argparse.py +182 -152
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_argparse_completer.py +566 -431
- cmd2-4.0.0b3/tests/test_argparse_subcommands.py +131 -0
- cmd2-4.0.0b3/tests/test_argparse_utils.py +567 -0
- cmd2-4.0.0b3/tests/test_categories.py +130 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_cmd2.py +1109 -684
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_commandset.py +291 -276
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_completion.py +276 -259
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_dynamic_complete_style.py +6 -6
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_future_annotations.py +2 -2
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_history.py +263 -263
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_parsing.py +425 -425
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_plugin.py +86 -86
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_pt_utils.py +63 -56
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_py_completion.py +5 -5
- cmd2-4.0.0b3/tests/test_rich_utils.py +363 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_run_pyscript.py +44 -44
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_string_utils.py +55 -29
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_utils.py +63 -63
- cmd2-4.0.0b1/cmd2/argparse_custom.py +0 -1310
- cmd2-4.0.0b1/cmd2/command_definition.py +0 -202
- cmd2-4.0.0b1/cmd2/constants.py +0 -53
- cmd2-4.0.0b1/cmd2/rich_utils.py +0 -540
- cmd2-4.0.0b1/cmd2/types.py +0 -61
- cmd2-4.0.0b1/docs/api/argparse_custom.md +0 -3
- cmd2-4.0.0b1/docs/api/command_definition.md +0 -3
- cmd2-4.0.0b1/examples/cmd2_history.dat +0 -0
- cmd2-4.0.0b1/examples/default_categories.py +0 -76
- cmd2-4.0.0b1/examples/pretty_print.py +0 -44
- cmd2-4.0.0b1/examples/scripts/save_help_text.py +0 -97
- cmd2-4.0.0b1/tests/test_argparse_custom.py +0 -355
- cmd2-4.0.0b1/tests/test_argparse_subcommands.py +0 -133
- cmd2-4.0.0b1/tests/test_categories.py +0 -109
- cmd2-4.0.0b1/tests/test_rich_utils.py +0 -194
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/.prettierignore +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/.prettierrc +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/GEMINI.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/LICENSE +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/MANIFEST.in +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/clipboard.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/colors.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/exceptions.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/plugin.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2/py.typed +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/cmd2.png +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/codecov.yml +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/argparse_completer.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/clipboard.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/cmd.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/colors.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/completion.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/constants.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/decorators.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/exceptions.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/history.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/parsing.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/plugin.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/pt_utils.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/py_bridge.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/rich_utils.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/string_utils.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/styles.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/api/utils.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/examples/alternate_event_loops.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/examples/examples.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/examples/getting_started.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/examples/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/async_commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/builtin_commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/clipboard.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/disable_commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/history.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/hooks.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/multiline_commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/os.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/packaging.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/plugins.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/prompt.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/redirection.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/scripting.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/settings.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/startup_commands.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/table_creation.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/features/theme.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/migrating/incompatibilities.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/migrating/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/migrating/minimum.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/migrating/why.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/mixins/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/mixins/mixin_template.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overrides/main.html +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overview/alternatives.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overview/index.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overview/installation.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overview/integrating.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/overview/resources.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/testing.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/docs/upgrades.md +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/.cmd2rc +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/modular_commands/__init__.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/rich_theme.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/arg_printer.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/nested.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/quit.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/script.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/scripts/script.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/tmux_launch.sh +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/examples/tmux_split.sh +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/package.json +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/setup.cfg +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/.cmd2rc +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/__init__.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/py_locals.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/pyscript/stdout_capture.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/relative_multiple.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/script.py +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/script.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/binary.bin +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/empty.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/help.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/nested.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/one_down.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/postcmds.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/precmds.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/scripts/utf8.txt +0 -0
- {cmd2-4.0.0b1 → cmd2-4.0.0b3}/tests/test_utils_defining_class.py +0 -0
|
@@ -3,13 +3,18 @@ repos:
|
|
|
3
3
|
rev: "v6.0.0"
|
|
4
4
|
hooks:
|
|
5
5
|
- id: check-case-conflict
|
|
6
|
+
- id: check-executables-have-shebangs
|
|
6
7
|
- id: check-merge-conflict
|
|
7
8
|
- id: check-toml
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: detect-private-key
|
|
8
11
|
- id: end-of-file-fixer
|
|
12
|
+
- id: fix-byte-order-marker
|
|
13
|
+
- id: mixed-line-ending
|
|
9
14
|
- id: trailing-whitespace
|
|
10
15
|
|
|
11
16
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
-
rev: "v0.15.
|
|
17
|
+
rev: "v0.15.8"
|
|
13
18
|
hooks:
|
|
14
19
|
- id: ruff-format
|
|
15
20
|
args: [--config=ruff.toml]
|
|
@@ -23,3 +28,13 @@ repos:
|
|
|
23
28
|
additional_dependencies:
|
|
24
29
|
- prettier@3.8.1
|
|
25
30
|
- prettier-plugin-toml@2.0.6
|
|
31
|
+
|
|
32
|
+
- repo: https://github.com/crate-ci/typos
|
|
33
|
+
rev: v1.44.0
|
|
34
|
+
hooks:
|
|
35
|
+
- id: typos
|
|
36
|
+
exclude: |
|
|
37
|
+
(?x)^(
|
|
38
|
+
ruff.toml|
|
|
39
|
+
tests/.*
|
|
40
|
+
)$
|
cmd2-4.0.0b3/.typos.toml
ADDED
|
@@ -37,13 +37,15 @@ prompt is displayed.
|
|
|
37
37
|
longer needed
|
|
38
38
|
- `completer` functions must now return a `cmd2.Completions` object instead of `list[str]`.
|
|
39
39
|
- `choices_provider` functions must now return a `cmd2.Choices` object instead of `list[str]`.
|
|
40
|
-
- An argparse argument's `descriptive_headers` field is now called `
|
|
41
|
-
- `CompletionItem.descriptive_data` is now called `CompletionItem.
|
|
40
|
+
- An argparse argument's `descriptive_headers` field is now called `table_columns`.
|
|
41
|
+
- `CompletionItem.descriptive_data` is now called `CompletionItem.table_data`.
|
|
42
|
+
- Removed `DEFAULT_DESCRIPTIVE_HEADERS`. This means you must define `table_columns` when using
|
|
43
|
+
`CompletionItem.table_data` data.
|
|
42
44
|
- `Cmd.default_sort_key` moved to `utils.DEFAULT_STR_SORT_KEY`.
|
|
43
45
|
- Moved completion state data, which previously resided in `Cmd`, into other classes.
|
|
44
46
|
- `Cmd.matches_sorted` -> `Completions.is_sorted` and `Choices.is_sorted`
|
|
45
|
-
- `Cmd.completion_hint` -> `Completions.
|
|
46
|
-
- `Cmd.formatted_completions` -> `Completions.
|
|
47
|
+
- `Cmd.completion_hint` -> `Completions.hint`
|
|
48
|
+
- `Cmd.formatted_completions` -> `Completions.table` (Now a Rich Table)
|
|
47
49
|
- `Cmd.allow_appended_space/allow_closing_quote` -> `Completions.allow_finalization`
|
|
48
50
|
- Removed `Cmd.matches_delimited` since it's no longer used.
|
|
49
51
|
- Removed `flag_based_complete` and `index_based_complete` functions since their functionality
|
|
@@ -61,6 +63,39 @@ prompt is displayed.
|
|
|
61
63
|
`add_alert()`. This new function is thread-safe and does not require you to acquire a mutex
|
|
62
64
|
before calling it like the previous functions did.
|
|
63
65
|
- Removed `Cmd.default_to_shell`.
|
|
66
|
+
- Removed `Cmd.ruler` since `cmd2` no longer uses it.
|
|
67
|
+
- All parsers used with `cmd2` commands must be an instance of `Cmd2ArgumentParser` or a child
|
|
68
|
+
class of it.
|
|
69
|
+
- Removed `set_ap_completer_type()` and `get_ap_completer_type()` since `ap_completer_type` is
|
|
70
|
+
now a public member of `Cmd2ArgumentParser`.
|
|
71
|
+
- Moved `set_parser_prog()` to `Cmd2ArgumentParser.update_prog()`.
|
|
72
|
+
- Renamed `cmd2_handler` to `cmd2_subcmd_handler` in the `argparse.Namespace` for clarity.
|
|
73
|
+
- Removed `Cmd2AttributeWrapper` class. `argparse.Namespace` objects passed to command functions
|
|
74
|
+
now contain direct attributes for `cmd2_statement` and `cmd2_subcmd_handler`.
|
|
75
|
+
- Renamed `cmd2/command_definition.py` to `cmd2/command_set.py`.
|
|
76
|
+
- Removed `Cmd.doc_header` and the `with_default_category` decorator. Help categorization is now
|
|
77
|
+
driven by the `DEFAULT_CATEGORY` class variable (see **Simplified command categorization** in
|
|
78
|
+
the Enhancements section below for details).
|
|
79
|
+
- Removed `Cmd.undoc_header` since all commands are now considered categorized.
|
|
80
|
+
- Renamed `Cmd.cmd_func()` to `Cmd.get_command_func()`.
|
|
81
|
+
- `cmd2` no longer sets a default title for a subparsers group. If you desire a title, you will
|
|
82
|
+
need to pass one in like this `parser.add_subparsers(title="subcommands")`. This is standard
|
|
83
|
+
`argparse` behavior.
|
|
84
|
+
- `TextGroup` is now a standalone Rich renderable.
|
|
85
|
+
- Removed `formatter_creator` parameter from `TextGroup.__init__()`.
|
|
86
|
+
- Removed `Cmd2ArgumentParser.create_text_group()` method.
|
|
87
|
+
- `argparse` and `Rich` integration refactoring:
|
|
88
|
+
- Renamed `argparse_custom` module to `argparse_utils`.
|
|
89
|
+
- Moved the following classes from `argparse_utils` to `rich_utils`:
|
|
90
|
+
- `Cmd2HelpFormatter`
|
|
91
|
+
- `ArgumentDefaultsCmd2HelpFormatter`
|
|
92
|
+
- `MetavarTypeCmd2HelpFormatter`
|
|
93
|
+
- `RawDescriptionCmd2HelpFormatter`
|
|
94
|
+
- `RawTextCmd2HelpFormatter`
|
|
95
|
+
- `TextGroup`
|
|
96
|
+
- Replaced the global `APP_THEME` constant in `rich_utils.py` with `get_theme()` and
|
|
97
|
+
`set_theme()` functions to support lazy initialization and safer in-place updates of the
|
|
98
|
+
theme.
|
|
64
99
|
- Enhancements
|
|
65
100
|
- New `cmd2.Cmd` parameters
|
|
66
101
|
- **auto_suggest**: (boolean) if `True`, provide fish shell style auto-suggestions. These
|
|
@@ -75,9 +110,31 @@ prompt is displayed.
|
|
|
75
110
|
- **get_rprompt**: override to populate right prompt
|
|
76
111
|
- **pre_prompt**: hook method that is called before the prompt is displayed, but after
|
|
77
112
|
`prompt-toolkit` event loop has started
|
|
113
|
+
- **read_secret**: read secrets like passwords without displaying them to the terminal
|
|
114
|
+
- **ppretty**: a cmd2-compatible replacement for `rich.pretty.pprint()`
|
|
78
115
|
- New settables:
|
|
79
116
|
- **max_column_completion_results**: (int) the maximum number of completion results to
|
|
80
117
|
display in a single column
|
|
118
|
+
- `cmd2.Cmd.select` has been revamped to use the
|
|
119
|
+
[choice](https://python-prompt-toolkit.readthedocs.io/en/3.0.52/pages/asking_for_a_choice.html)
|
|
120
|
+
function from `prompt-toolkit` when both **stdin** and **stdout** are TTYs
|
|
121
|
+
- Add support for Python 3.15 by fixing various bugs related to internal `argparse` changes
|
|
122
|
+
- Added `common_prefix` method to `cmd2.string_utils` module as a replacement for
|
|
123
|
+
`os.path.commonprefix` since that is now deprecated in Python 3.15
|
|
124
|
+
- Simplified command categorization:
|
|
125
|
+
- By default, all commands in a class are grouped under its `DEFAULT_CATEGORY`.
|
|
126
|
+
- Individual commands can still be manually moved using the `with_category()` decorator.
|
|
127
|
+
- For more details and examples, see the [Help](docs/features/help.md) documentation and the
|
|
128
|
+
`examples/default_categories.py` file.
|
|
129
|
+
- `CommandSet` is now a generic class, which allows developers to parameterize it with their
|
|
130
|
+
specific `cmd2.Cmd` subclass (e.g.,`class MyCommandSet(CommandSet[MyApp]):`). This provides
|
|
131
|
+
full type hints and IDE autocompletion for `self._cmd` without needing to override and cast
|
|
132
|
+
the property.
|
|
133
|
+
|
|
134
|
+
## 3.5.0 (April 13, 2026)
|
|
135
|
+
|
|
136
|
+
- Bug Fixes
|
|
137
|
+
- Fixed issue where Rich stripped colors from text in test environments where TERM=dumb.
|
|
81
138
|
|
|
82
139
|
## 3.4.0 (March 3, 2026)
|
|
83
140
|
|
|
@@ -7,8 +7,8 @@ install: ## Install the virtual environment with dependencies
|
|
|
7
7
|
@echo "🚀 Creating uv Python virtual environment"
|
|
8
8
|
@uv python install 3.14
|
|
9
9
|
@uv sync --python=3.14
|
|
10
|
-
@echo "🚀 Installing Git
|
|
11
|
-
@uv run
|
|
10
|
+
@echo "🚀 Installing Git prek hooks locally"
|
|
11
|
+
@uv run prek install -f
|
|
12
12
|
@echo "🚀 Installing Prettier using npm"
|
|
13
13
|
@npm install -q --no-fund --include=dev
|
|
14
14
|
|
|
@@ -16,8 +16,8 @@ install: ## Install the virtual environment with dependencies
|
|
|
16
16
|
check: ## Run code quality tools.
|
|
17
17
|
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
|
|
18
18
|
@uv lock --locked
|
|
19
|
-
@echo "🚀 Linting code and documentation: Running
|
|
20
|
-
@uv run
|
|
19
|
+
@echo "🚀 Auto-formatting/Linting code and documentation: Running prek"
|
|
20
|
+
@uv run prek run -a
|
|
21
21
|
@echo "🚀 Static type checking: Running mypy"
|
|
22
22
|
@uv run mypy
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmd2
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.0b3
|
|
4
4
|
Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
|
|
5
5
|
Author: cmd2 Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -25,8 +25,8 @@ License-File: LICENSE
|
|
|
25
25
|
Requires-Dist: backports.strenum; python_version == "3.10"
|
|
26
26
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
27
27
|
Requires-Dist: pyperclip>=1.8.2
|
|
28
|
-
Requires-Dist: rich>=
|
|
29
|
-
Requires-Dist: rich-argparse>=1.7.
|
|
28
|
+
Requires-Dist: rich>=15.0.0
|
|
29
|
+
Requires-Dist: rich-argparse>=1.7.2
|
|
30
30
|
Requires-Dist: typing-extensions; python_version == "3.10"
|
|
31
31
|
Dynamic: license-file
|
|
32
32
|
|
|
@@ -139,7 +139,7 @@ examples.
|
|
|
139
139
|
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
140
140
|
- Basic cmd2 examples to demonstrate how to use various features
|
|
141
141
|
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
142
|
-
- More complex examples that demonstrate more
|
|
142
|
+
- More complex examples that demonstrate more features about how to put together a complete
|
|
143
143
|
application
|
|
144
144
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
145
145
|
- Basic cookiecutter template for cmd2 application :
|
|
@@ -107,7 +107,7 @@ examples.
|
|
|
107
107
|
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
108
108
|
- Basic cmd2 examples to demonstrate how to use various features
|
|
109
109
|
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
110
|
-
- More complex examples that demonstrate more
|
|
110
|
+
- More complex examples that demonstrate more features about how to put together a complete
|
|
111
111
|
application
|
|
112
112
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
113
113
|
- Basic cookiecutter template for cmd2 application :
|
|
@@ -12,18 +12,14 @@ from . import (
|
|
|
12
12
|
string_utils,
|
|
13
13
|
)
|
|
14
14
|
from .argparse_completer import set_default_ap_completer_type
|
|
15
|
-
from .
|
|
15
|
+
from .argparse_utils import (
|
|
16
16
|
Cmd2ArgumentParser,
|
|
17
|
-
Cmd2AttributeWrapper,
|
|
18
17
|
register_argparse_argument_parameter,
|
|
19
18
|
set_default_argument_parser_type,
|
|
20
19
|
)
|
|
21
20
|
from .cmd2 import Cmd
|
|
22
21
|
from .colors import Color
|
|
23
|
-
from .
|
|
24
|
-
CommandSet,
|
|
25
|
-
with_default_category,
|
|
26
|
-
)
|
|
22
|
+
from .command_set import CommandSet
|
|
27
23
|
from .completion import (
|
|
28
24
|
Choices,
|
|
29
25
|
CompletionItem,
|
|
@@ -48,7 +44,17 @@ from .exceptions import (
|
|
|
48
44
|
)
|
|
49
45
|
from .parsing import Statement
|
|
50
46
|
from .py_bridge import CommandResult
|
|
51
|
-
from .rich_utils import
|
|
47
|
+
from .rich_utils import (
|
|
48
|
+
ArgumentDefaultsCmd2HelpFormatter,
|
|
49
|
+
Cmd2HelpFormatter,
|
|
50
|
+
MetavarTypeCmd2HelpFormatter,
|
|
51
|
+
RawDescriptionCmd2HelpFormatter,
|
|
52
|
+
RawTextCmd2HelpFormatter,
|
|
53
|
+
RichPrintKwargs,
|
|
54
|
+
TextGroup,
|
|
55
|
+
get_theme,
|
|
56
|
+
set_theme,
|
|
57
|
+
)
|
|
52
58
|
from .string_utils import stylize
|
|
53
59
|
from .styles import Cmd2Style
|
|
54
60
|
from .utils import (
|
|
@@ -59,50 +65,56 @@ from .utils import (
|
|
|
59
65
|
)
|
|
60
66
|
|
|
61
67
|
__all__: list[str] = [ # noqa: RUF022
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
"COMMAND_NAME",
|
|
69
|
+
"DEFAULT_SHORTCUTS",
|
|
64
70
|
# Argparse Exports
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'set_default_argument_parser_type',
|
|
71
|
+
"Cmd2ArgumentParser",
|
|
72
|
+
"register_argparse_argument_parameter",
|
|
73
|
+
"set_default_ap_completer_type",
|
|
74
|
+
"set_default_argument_parser_type",
|
|
70
75
|
# Cmd2
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
"Cmd",
|
|
77
|
+
"CommandResult",
|
|
78
|
+
"CommandSet",
|
|
79
|
+
"Statement",
|
|
75
80
|
# Colors
|
|
76
81
|
"Color",
|
|
77
82
|
# Completion
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
"Choices",
|
|
84
|
+
"CompletionItem",
|
|
85
|
+
"Completions",
|
|
81
86
|
# Decorators
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'as_subcommand_to',
|
|
87
|
+
"with_argument_list",
|
|
88
|
+
"with_argparser",
|
|
89
|
+
"with_category",
|
|
90
|
+
"as_subcommand_to",
|
|
87
91
|
# Exceptions
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
"Cmd2ArgparseError",
|
|
93
|
+
"CommandSetRegistrationError",
|
|
94
|
+
"CompletionError",
|
|
95
|
+
"PassThroughException",
|
|
96
|
+
"SkipPostcommandHooks",
|
|
93
97
|
# modules
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
"plugin",
|
|
99
|
+
"rich_utils",
|
|
100
|
+
"string_utils",
|
|
97
101
|
# Rich Utils
|
|
98
|
-
|
|
102
|
+
"ArgumentDefaultsCmd2HelpFormatter",
|
|
103
|
+
"Cmd2HelpFormatter",
|
|
104
|
+
"get_theme",
|
|
105
|
+
"MetavarTypeCmd2HelpFormatter",
|
|
106
|
+
"RawDescriptionCmd2HelpFormatter",
|
|
107
|
+
"RawTextCmd2HelpFormatter",
|
|
108
|
+
"RichPrintKwargs",
|
|
109
|
+
"set_theme",
|
|
110
|
+
"TextGroup",
|
|
99
111
|
# String Utils
|
|
100
|
-
|
|
112
|
+
"stylize",
|
|
101
113
|
# Styles,
|
|
102
114
|
"Cmd2Style",
|
|
103
115
|
# Utilities
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
"categorize",
|
|
117
|
+
"CustomCompletionSettings",
|
|
118
|
+
"Settable",
|
|
119
|
+
"set_default_str_sort_key",
|
|
108
120
|
]
|