1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-08-08 22:36:48 +02:00

fix proc doc - output is dict or list of dicts

This commit is contained in:
Kelly Brazil
2024-01-30 10:59:39 -08:00
parent 9f78dc6afa
commit 29f1a1d425
2 changed files with 7 additions and 5 deletions

View File

@ -127,7 +127,9 @@ Examples:
### parse
```python
def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict]
def parse(data: str,
raw: bool = False,
quiet: bool = False) -> Union[List[Dict], Dict]
```
Main text parsing function
@ -140,7 +142,7 @@ Parameters:
Returns:
List of Dictionaries. Raw or processed structured data.
Dictionary or List of Dictionaries. Raw or processed structured data.
### Parser Information
Compatibility: linux

View File

@ -119,7 +119,7 @@ Examples:
"""
import re
import importlib
from typing import List, Dict
from typing import List, Dict, Union
import jc.utils
from jc.exceptions import ParseError
@ -141,7 +141,7 @@ def parse(
data: str,
raw: bool = False,
quiet: bool = False
) -> List[Dict]:
) -> Union[List[Dict], Dict]:
"""
Main text parsing function
@ -153,7 +153,7 @@ def parse(
Returns:
List of Dictionaries. Raw or processed structured data.
Dictionary or List of Dictionaries. Raw or processed structured data.
"""
jc.utils.input_type_check(data)