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:
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user