You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,22 @@
18
18
<spanid="v1-9-3" />
19
19
20
20
## ... `v1.9.3` Big Update 🚀
21
+
21
22
* Added a new method `Color.str_to_hsla()` to parse HSLA colors from strings.
22
-
* Changed the default syntax colors for `Data.to_str()` and therefore also `Data.print()` to console default colors.
23
+
* Changed the default syntax highlighting for `Data.to_str()` and therefore also `Data.print()` to use console default colors.
24
+
* Added the missing but needed dunder methods to the `Args` and `ArgResult` classes and the `rgba`, `hsla` and `hexa` color objects for better usability and type checking.
25
+
* Added three new methods to `Args`:
26
+
-`get()` returns the argument result for a given alias, or a default value if not found
27
+
-`existing()` yields only the existing arguments as tuples of `(alias, ArgResult)`
28
+
-`missing()` yields only the missing arguments as tuples of `(alias, ArgResult)`
23
29
* Added a new attribute `is_positional` to `ArgResult`, which indicates whether the argument is a positional argument or not.
30
+
* The `ArgResult` class now also has a `dict()` method, which returns the argument result as a dictionary.
31
+
* Added new properties `is_tty` and `supports_color` to the `Console` class, `home` to the `Path` class and `is_win` to the `System` class.
24
32
* Added the option to add format specifiers to the `{current}`, `{total}` and `{percentage}` placeholders in the `bar_format` and `limited_bar_format` of `ProgressBar`.
25
33
* Finally fixed the `C901 'Console.get_args' is too complex (39)` linting error by refactoring the method into its own helper class.
34
+
* Changed the string- and repr-representations of the `rgba` and `hsla` color objects and newly implemented it for the `Args` and `ArgResult` classes.
26
35
* Made internal, global constants, which's values never change, into `Final` constants for better type checking.
27
-
* The names of all internal classes and methods are all noi longer prefixed with a double underscore (`__`), but a single underscore (`_`) instead.
36
+
* The names of all internal classes and methods are all no longer prefixed with a double underscore (`__`), but a single underscore (`_`) instead.
28
37
* Changed all methods defined as `@staticmethod` to `@classmethod` where applicable, to improve inheritance capabilities.
29
38
* Adjusted the whole library's type hints to be way more strict and accurate, using `mypy` as static type checker.
30
39
* Change the class-property definitions to be defined via `metaclass` and using `@property` decorators, to make them compatible with `mypyc`.
@@ -35,13 +44,15 @@
35
44
36
45
**BREAKING CHANGES:**
37
46
* Renamed `Data.to_str()` to `Data.render()`, since that describes its functionality better (*especially with the syntax highlighting option*).
47
+
* Renamed the constant `ANSI.ESCAPED_CHAR` to `ANSI.CHAR_ESCAPED` for better consistency with the other constant names.
38
48
* Removed the general `Pattern` and `Match` type aliases from the `base.types` module (*they are pointless since you should always use a specific type and not "type1 OR typeB"*).
39
49
* Removed the `_` prefix from the param `_syntax_highlighting` in `Data.render()`, since it's no longer just for internal use.
40
50
41
51
42
52
<spanid="v1-9-2" />
43
53
44
54
## 16.12.2025 `v1.9.2`
55
+
45
56
* Added a new class `LazyRegex` to the `regex` module, which is used to define regex patterns that are only compiled when they are used for the first time.
46
57
* Removed unnecessary character escaping in the precompiled regex patterns in the `console` module.
47
58
* Removed all the runtime type-checks that can also be checked using static type-checking tools, since you're supposed to use type checkers in modern python anyway, and to improve performance.
@@ -64,6 +75,7 @@
64
75
<spanid="v1-9-1" />
65
76
66
77
## 26.11.2025 `v1.9.1`
78
+
67
79
* Unified the module and class docstring styles throughout the whole library.
68
80
* Moved the Protocol `ProgressUpdater` from the `console` module to the `types` module.
69
81
* Added throttling to the `ProgressBar` update methods to impact the actual process' performance as little as possible.
@@ -79,6 +91,7 @@
79
91
<spanid="v1-9-0" />
80
92
81
93
## 21.11.2025 `v1.9.0` Big Update 🚀
94
+
82
95
* Standardized the docstrings for all public methods in the whole library to use the same style and structure.
83
96
* Replaced left over single quotes with double quotes for consistency.
84
97
* Fixed a bug inside `Data.remove_empty_items()`, where types other than strings where passed to `String.is_empty()`, which caused an exception.
@@ -218,7 +231,7 @@
218
231
## 17.06.2025 `v1.7.2`
219
232
220
233
* The `Console.w`, `Console.h` and `Console.wh` class properties now return a default size if there is no console, instead of throwing an error.
221
-
* It wasn't actually possible to use default console-colors (*e.g.*`"red"`, `"green"`, ...) for the color params in `Console.log()` so that option was completely removed again.
234
+
* It wasn't actually possible to use default console-colors (*e.g.*`"red"`, `"green"`, …) for the color params in `Console.log()` so that option was completely removed again.
222
235
* Upgraded the speed of `FormatCodes.to_ansi()` by adding the internal ability to skip the `default_color` validation.
223
236
* Fixed type hints for the whole library.
224
237
* Fixed a small bug in `Console.pause_exit()`, where the key, pressed to unpause wasn't suppressed, so it was written into the next console input after unpausing.
@@ -232,7 +245,7 @@
232
245
* Added a new method `Console.log_box_bordered()`, which does the same as `Console.log_box_filled()`, but with a border instead of a background color.
233
246
* The module `xx_format_codes` now treats the `[*]` to-default-color-reset as a normal full-reset, when no `default_color` is set, instead of just counting it as an invalid format code.
234
247
* Fixed bug where entering a color as HEX integer in the color params of the methods `Console.log()`, `Console.log_box_filled()` and `Console.log_box_bordered()` would not work, because it was not properly converted to a format code.
235
-
* You can now use default console colors (*e.g.*`"red"`, `"green"`, ...) for the color params in `Console.log()`.
248
+
* You can now use default console colors (*e.g.*`"red"`, `"green"`, …) for the color params in `Console.log()`.
236
249
* The methods `Console.log_box_filled()` and `Console.log_box_bordered()` no longer right-strip spaces, so you can make multiple log boxes the same width, by adding spaces to the end of the text.
237
250
238
251
**BREAKING CHANGES:**
@@ -798,7 +811,7 @@ from XulbuX import rgb, hsl, hexa
0 commit comments