Commit 2ef7b9a
Refactored cmd2 to better account for our use of Rich. (#1477)
* Added string_utils.py which contains all string utility functions.
This includes quoting and alignment functions from utils.py.
This also includes style-related functions from ansi.py.
* Added colors.py which contains a StrEnum of all color names supported by Rich.
* Added styles.py which contains a StrEnum of all cmd2-specific style names and their respective
style definitions.
* Moved string styling functionality from ansi.py to string_utils.py.
* Removed all text style Enums from ansi.py in favor of Rich styles.
* Renamed ansi.py to terminal_utils.py to reflect the functions left in it.
* Removed table_creator.py in favor of Rich tables.
* Renamed rich_utils.allow_style to rich_utils.ALLOW_STYLE to be consistent with our other global settings.
---------
Co-authored-by: Todd Leonhardt <[email protected]>1 parent db2654c commit 2ef7b9a
File tree
47 files changed
+1235
-4794
lines changed- .github
- cmd2
- docs
- api
- features
- examples
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+1235
-4794
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | 20 | | |
18 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 12 | + | |
23 | 13 | | |
24 | 14 | | |
25 | 15 | | |
| |||
30 | 20 | | |
31 | 21 | | |
32 | 22 | | |
| 23 | + | |
33 | 24 | | |
34 | 25 | | |
35 | 26 | | |
| |||
53 | 44 | | |
54 | 45 | | |
55 | 46 | | |
| 47 | + | |
| 48 | + | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| |||
63 | 56 | | |
64 | 57 | | |
65 | 58 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 59 | | |
77 | 60 | | |
78 | 61 | | |
| |||
85 | 68 | | |
86 | 69 | | |
87 | 70 | | |
| 71 | + | |
| 72 | + | |
88 | 73 | | |
89 | 74 | | |
90 | 75 | | |
| |||
100 | 85 | | |
101 | 86 | | |
102 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
103 | 93 | | |
104 | 94 | | |
105 | 95 | | |
| |||
0 commit comments