diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eed7248..0e7ff91d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - PyPI badge in `README.md` - GitHub actions are limited to the `dev` and `master` branches - `Python 3.13` added to `test.yml` +- `README.md` modified ## [6.3] - 2024-09-19 ### Added - `data` directory diff --git a/README.md b/README.md index 9921cd90..e791fa90 100644 --- a/README.md +++ b/README.md @@ -347,15 +347,15 @@ Filename: test.txt #### 1. lprint -This function prints a grid (`length` by `height`) of any given character. +This function prints a grid (`length` by `height`) of any given character in normal mode and raise `artError` in exception. ```pycon >>> lprint(length=15, height=2, char="*") *************** *************** ``` -* Note1: This feature has been added since `Version 6.4` -* Note2: The default values are `length=15`, `height=1`, `char='#'` +* Note1 : New in `Version 6.4` +* Note2 : The default values are `length=15`, `height=1`, `char='#'` #### 2. line @@ -365,8 +365,8 @@ This function returns a grid (`length` by `height`) of any given character as `s '***************\n***************' ``` -* Note1: This feature has been added since `Version 6.4` -* Note2: The default values are `length=15`, `height=1`, `char='#'` +* Note1 : New in `Version 6.4` +* Note2 : The default values are `length=15`, `height=1`, `char='#'` ### Decoration @@ -743,7 +743,17 @@ _/ _ _ _/ text2art str raise artError - + + + lprint + None + raise artError + + + line + str + raise artError + set_default None diff --git a/art/functions.py b/art/functions.py index 154072b3..4a603ffc 100644 --- a/art/functions.py +++ b/art/functions.py @@ -253,11 +253,8 @@ def lprint(length=15, height=1, char='#'): :type char: str :return: None """ - try: - grid = line(length, height, char) - print(grid) - except artError as e: - print(str(e)) + grid = line(length, height, char) + print(grid) def line(length=15, height=1, char='#'): diff --git a/art/tests/test.py b/art/tests/test.py index 979e1dab..a1dfda97 100644 --- a/art/tests/test.py +++ b/art/tests/test.py @@ -11,7 +11,17 @@ *************** *************** >>> lprint(length=0, height=1, char="#") -The 'length' must be an int higher than 0. +Traceback (most recent call last): + ... +art.art.artError: The 'length' must be an int higher than 0. +>>> lprint(length=15, height='test', char="#") +Traceback (most recent call last): + ... +art.art.artError: The 'height' must be an int higher than 0. +>>> lprint(length=15, height=2, char=4) +Traceback (most recent call last): + ... +art.art.artError: The 'char' type must be str. >>> line(length=10, height=1, char="#") '##########' >>> line(length=15, height=2, char="*")