Skip to content

Commit 7a8f6c7

Browse files
committed
finish bugfix & clarify CHANGELOG
1 parent 401ab4e commit 7a8f6c7

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Removed unnecessary character escaping in the precompiled regex patterns in the `console` module.
2323
* 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.
2424
* Renamed the internal class method `FormatCodes.__config_console()` to `FormatCodes._config_console()` to make it callable, but still indicate that it's internal.
25-
* Fixed a small bug where `Console.log_box_…()` would sometimes raise an exception due to an issue in the internal method `__prepare_log_box()`.
25+
* Fixed a small bug where `Console.log_box_…()` would crash, when calling it without providing any `*values` (*content for inside the box*).
2626

2727
**BREAKING CHANGES:**
2828
* The arguments when calling `Console.get_args()` are no longer specified in a single dictionary, but now each argument is passed as a separate keyword argument.<br>

src/xulbux/console.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,12 @@ def log_box_filled(
716716
) for line, unfmt in zip(lines, unfmt_lines)]
717717

718718
FormatCodes.print(
719-
f"{start}{spaces_l}[bg:{box_bg_color}]{pady}[*]\n" + "\n".join(lines)
720-
+ f"\n{spaces_l}[bg:{box_bg_color}]{pady}[_]",
719+
( \
720+
f"{start}{spaces_l}[bg:{box_bg_color}]{pady}[*]\n"
721+
+ "\n".join(lines)
722+
+ ("\n" if lines else "")
723+
+ f"{spaces_l}[bg:{box_bg_color}]{pady}[_]"
724+
),
721725
default_color=default_color or "#000",
722726
sep="\n",
723727
end=end,
@@ -814,7 +818,7 @@ def log_box_bordered(
814818
( \
815819
f"{start}{border_t}[_]\n"
816820
+ "\n".join(lines)
817-
+ ("\n" if len(lines) > 0 else "")
821+
+ ("\n" if lines else "")
818822
+ f"{border_b}[_]"
819823
),
820824
default_color=default_color,

0 commit comments

Comments
 (0)