mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
doc update
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
* [jc.utils](#jc.utils)
|
* [jc.utils](#jc.utils)
|
||||||
* [warning\_message](#jc.utils.warning_message)
|
* [warning\_message](#jc.utils.warning_message)
|
||||||
* [error\_message](#jc.utils.error_message)
|
* [error\_message](#jc.utils.error_message)
|
||||||
|
* [is\_compatible](#jc.utils.is_compatible)
|
||||||
* [compatibility](#jc.utils.compatibility)
|
* [compatibility](#jc.utils.compatibility)
|
||||||
* [has\_data](#jc.utils.has_data)
|
* [has\_data](#jc.utils.has_data)
|
||||||
* [convert\_to\_int](#jc.utils.convert_to_int)
|
* [convert\_to\_int](#jc.utils.convert_to_int)
|
||||||
@ -26,8 +27,8 @@ jc - JSON Convert utils
|
|||||||
def warning_message(message_lines: List[str]) -> None
|
def warning_message(message_lines: List[str]) -> None
|
||||||
```
|
```
|
||||||
|
|
||||||
Prints warning message for non-fatal issues. The first line is
|
Prints warning message to STDERR for non-fatal issues. The first line
|
||||||
prepended with 'jc: Warning - ' and subsequent lines are indented.
|
is prepended with 'jc: Warning - ' and subsequent lines are indented.
|
||||||
Wraps text as needed based on the terminal width.
|
Wraps text as needed based on the terminal width.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -46,7 +47,7 @@ Returns:
|
|||||||
def error_message(message_lines: List[str]) -> None
|
def error_message(message_lines: List[str]) -> None
|
||||||
```
|
```
|
||||||
|
|
||||||
Prints an error message for fatal issues. The first line is
|
Prints an error message to STDERR for fatal issues. The first line is
|
||||||
prepended with 'jc: Error - ' and subsequent lines are indented.
|
prepended with 'jc: Error - ' and subsequent lines are indented.
|
||||||
Wraps text as needed based on the terminal width.
|
Wraps text as needed based on the terminal width.
|
||||||
|
|
||||||
@ -58,6 +59,16 @@ Returns:
|
|||||||
|
|
||||||
None - just prints output to STDERR
|
None - just prints output to STDERR
|
||||||
|
|
||||||
|
<a id="jc.utils.is_compatible"></a>
|
||||||
|
|
||||||
|
### is\_compatible
|
||||||
|
|
||||||
|
```python
|
||||||
|
def is_compatible(compatible: List) -> bool
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns True if the parser is compatible with the running OS platform.
|
||||||
|
|
||||||
<a id="jc.utils.compatibility"></a>
|
<a id="jc.utils.compatibility"></a>
|
||||||
|
|
||||||
### compatibility
|
### compatibility
|
||||||
@ -68,8 +79,8 @@ def compatibility(mod_name: str,
|
|||||||
quiet: bool = False) -> None
|
quiet: bool = False) -> None
|
||||||
```
|
```
|
||||||
|
|
||||||
Checks for the parser's compatibility with the running OS
|
Checks for the parser's compatibility with the running OS platform and
|
||||||
platform.
|
prints a warning message to STDERR if not compatible and quiet=False.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
|
10
jc/utils.py
10
jc/utils.py
@ -31,8 +31,8 @@ def _safe_print(string: str, sep=' ', end='\n', file=sys.stdout, flush=False) ->
|
|||||||
|
|
||||||
def warning_message(message_lines: List[str]) -> None:
|
def warning_message(message_lines: List[str]) -> None:
|
||||||
"""
|
"""
|
||||||
Prints warning message for non-fatal issues. The first line is
|
Prints warning message to STDERR for non-fatal issues. The first line
|
||||||
prepended with 'jc: Warning - ' and subsequent lines are indented.
|
is prepended with 'jc: Warning - ' and subsequent lines are indented.
|
||||||
Wraps text as needed based on the terminal width.
|
Wraps text as needed based on the terminal width.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -67,7 +67,7 @@ def warning_message(message_lines: List[str]) -> None:
|
|||||||
|
|
||||||
def error_message(message_lines: List[str]) -> None:
|
def error_message(message_lines: List[str]) -> None:
|
||||||
"""
|
"""
|
||||||
Prints an error message for fatal issues. The first line is
|
Prints an error message to STDERR for fatal issues. The first line is
|
||||||
prepended with 'jc: Error - ' and subsequent lines are indented.
|
prepended with 'jc: Error - ' and subsequent lines are indented.
|
||||||
Wraps text as needed based on the terminal width.
|
Wraps text as needed based on the terminal width.
|
||||||
|
|
||||||
@ -113,8 +113,8 @@ def is_compatible(compatible: List) -> bool:
|
|||||||
|
|
||||||
def compatibility(mod_name: str, compatible: List, quiet: bool = False) -> None:
|
def compatibility(mod_name: str, compatible: List, quiet: bool = False) -> None:
|
||||||
"""
|
"""
|
||||||
Checks for the parser's compatibility with the running OS
|
Checks for the parser's compatibility with the running OS platform and
|
||||||
platform.
|
prints a warning message to STDERR if not compatible and quiet=False.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user