Skip to content

Commit fd99365

Browse files
committed
update 1.7.3
1 parent 9b4793f commit fd99365

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
# <br><b>Changelog</b><br>
1616

17+
## ... `v1.7.3`
18+
* removed the param `title_bg_color` from the `Console.log()` preset methods, since that is part of the preset and doesn't need to be changed by the user
19+
1720
## 17.06.2025 `v1.7.2`
1821
* 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
1922
* 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

src/xulbux/xx_console.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ def debug(
353353
format_linebreaks: bool = True,
354354
start: str = "",
355355
end: str = "\n",
356-
title_bg_color: Optional[Rgba | Hexa] = COLOR.yellow,
357356
default_color: Optional[Rgba | Hexa] = COLOR.text,
358357
pause: bool = False,
359358
exit: bool = False,
@@ -362,7 +361,7 @@ def debug(
362361
at the message and exit the program after the message was printed.
363362
If `active` is false, no debug message will be printed."""
364363
if active:
365-
Console.log("DEBUG", prompt, format_linebreaks, start, end, title_bg_color, default_color)
364+
Console.log("DEBUG", prompt, format_linebreaks, start, end, COLOR.yellow, default_color)
366365
Console.pause_exit(pause, exit)
367366

368367
@staticmethod
@@ -371,14 +370,13 @@ def info(
371370
format_linebreaks: bool = True,
372371
start: str = "",
373372
end: str = "\n",
374-
title_bg_color: Optional[Rgba | Hexa] = COLOR.blue,
375373
default_color: Optional[Rgba | Hexa] = COLOR.text,
376374
pause: bool = False,
377375
exit: bool = False,
378376
) -> None:
379377
"""A preset for `log()`: `INFO` log message with the options to pause
380378
at the message and exit the program after the message was printed."""
381-
Console.log("INFO", prompt, format_linebreaks, start, end, title_bg_color, default_color)
379+
Console.log("INFO", prompt, format_linebreaks, start, end, COLOR.blue, default_color)
382380
Console.pause_exit(pause, exit)
383381

384382
@staticmethod
@@ -387,14 +385,13 @@ def done(
387385
format_linebreaks: bool = True,
388386
start: str = "",
389387
end: str = "\n",
390-
title_bg_color: Optional[Rgba | Hexa] = COLOR.teal,
391388
default_color: Optional[Rgba | Hexa] = COLOR.text,
392389
pause: bool = False,
393390
exit: bool = False,
394391
) -> None:
395392
"""A preset for `log()`: `DONE` log message with the options to pause
396393
at the message and exit the program after the message was printed."""
397-
Console.log("DONE", prompt, format_linebreaks, start, end, title_bg_color, default_color)
394+
Console.log("DONE", prompt, format_linebreaks, start, end, COLOR.teal, default_color)
398395
Console.pause_exit(pause, exit)
399396

400397
@staticmethod
@@ -403,14 +400,13 @@ def warn(
403400
format_linebreaks: bool = True,
404401
start: str = "",
405402
end: str = "\n",
406-
title_bg_color: Optional[Rgba | Hexa] = COLOR.orange,
407403
default_color: Optional[Rgba | Hexa] = COLOR.text,
408404
pause: bool = False,
409405
exit: bool = False,
410406
) -> None:
411407
"""A preset for `log()`: `WARN` log message with the options to pause
412408
at the message and exit the program after the message was printed."""
413-
Console.log("WARN", prompt, format_linebreaks, start, end, title_bg_color, default_color)
409+
Console.log("WARN", prompt, format_linebreaks, start, end, COLOR.orange, default_color)
414410
Console.pause_exit(pause, exit)
415411

416412
@staticmethod
@@ -419,15 +415,14 @@ def fail(
419415
format_linebreaks: bool = True,
420416
start: str = "",
421417
end: str = "\n",
422-
title_bg_color: Optional[Rgba | Hexa] = COLOR.red,
423418
default_color: Optional[Rgba | Hexa] = COLOR.text,
424419
pause: bool = False,
425420
exit: bool = True,
426421
reset_ansi: bool = True,
427422
) -> None:
428423
"""A preset for `log()`: `FAIL` log message with the options to pause
429424
at the message and exit the program after the message was printed."""
430-
Console.log("FAIL", prompt, format_linebreaks, start, end, title_bg_color, default_color)
425+
Console.log("FAIL", prompt, format_linebreaks, start, end, COLOR.red, default_color)
431426
Console.pause_exit(pause, exit, reset_ansi=reset_ansi)
432427

433428
@staticmethod
@@ -436,15 +431,14 @@ def exit(
436431
format_linebreaks: bool = True,
437432
start: str = "",
438433
end: str = "\n",
439-
title_bg_color: Optional[Rgba | Hexa] = COLOR.magenta,
440434
default_color: Optional[Rgba | Hexa] = COLOR.text,
441435
pause: bool = False,
442436
exit: bool = True,
443437
reset_ansi: bool = True,
444438
) -> None:
445439
"""A preset for `log()`: `EXIT` log message with the options to pause
446440
at the message and exit the program after the message was printed."""
447-
Console.log("EXIT", prompt, format_linebreaks, start, end, title_bg_color, default_color)
441+
Console.log("EXIT", prompt, format_linebreaks, start, end, COLOR.magenta, default_color)
448442
Console.pause_exit(pause, exit, reset_ansi=reset_ansi)
449443

450444
@staticmethod

0 commit comments

Comments
 (0)