Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ Nearly all project configuration, including for dependencies and quality tools i

See the `dependencies` list under the `[project]` heading in [pyproject.toml](../pyproject.toml).

| Prerequisite | Minimum Version | Purpose |
| --------------------------------------------------- | --------------- | -------------------------------------- |
| [python](https://www.python.org/downloads/) | `3.10` | Python programming language |
| [pyperclip](https://github.com/asweigart/pyperclip) | `1.8` | Cross-platform clipboard functions |
| [wcwidth](https://pypi.python.org/pypi/wcwidth) | `0.2.10` | Measure the displayed width of unicode |
| Prerequisite | Minimum Version | Purpose |
| --------------------------------------------------- | --------------- | ---------------------------------- |
| [python](https://www.python.org/downloads/) | `3.10` | Python programming language |
| [pyperclip](https://github.com/asweigart/pyperclip) | `1.8` | Cross-platform clipboard functions |

> `macOS` and `Windows` each have an extra dependency to ensure they have a viable alternative to
> [readline](https://tiswww.case.edu/php/chet/readline/rltop.html) available.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- No longer setting parser's `prog` value in `with_argparser()` since it gets set in
`Cmd._build_parser()`. This code had previously been restored to support backward
compatibility in `cmd2` 2.0 family.
- Removed `table_creator` module in favor of `Rich` tables.

- Enhancements
- Simplified the process to set a custom parser for `cmd2's` built-in commands. See
Expand Down
32 changes: 11 additions & 21 deletions cmd2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,7 @@
from . import (
plugin,
rich_utils,
)
from .ansi import (
Bg,
Cursor,
EightBitBg,
EightBitFg,
Fg,
RgbBg,
RgbFg,
TextStyle,
style,
string_utils,
)
from .argparse_completer import set_default_ap_completer_type
from .argparse_custom import (
Expand All @@ -30,6 +20,7 @@
set_default_argument_parser_type,
)
from .cmd2 import Cmd
from .colors import ColorName
from .command_definition import (
CommandSet,
with_default_category,
Expand All @@ -53,6 +44,8 @@
)
from .parsing import Statement
from .py_bridge import CommandResult
from .string_utils import stylize
from .styles import Cmd2Style
from .utils import (
CompletionMode,
CustomCompletionSettings,
Expand All @@ -63,16 +56,6 @@
__all__: list[str] = [ # noqa: RUF022
'COMMAND_NAME',
'DEFAULT_SHORTCUTS',
# ANSI Exports
'Cursor',
'Bg',
'Fg',
'EightBitBg',
'EightBitFg',
'RgbBg',
'RgbFg',
'TextStyle',
'style',
# Argparse Exports
'Cmd2ArgumentParser',
'Cmd2AttributeWrapper',
Expand All @@ -85,6 +68,8 @@
'CommandResult',
'CommandSet',
'Statement',
# Color
"ColorName",
# Decorators
'with_argument_list',
'with_argparser',
Expand All @@ -100,6 +85,11 @@
# modules
'plugin',
'rich_utils',
'string_utils',
# String Utils
'stylize',
# Styles,
"Cmd2Style",
# Utilities
'categorize',
'CompletionMode',
Expand Down
Loading
Loading