mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
fixy mypy issues
This commit is contained in:
@ -60,10 +60,10 @@ def sparse_table_parse(data: List[str], delim: Optional[str] ='\u2063') -> List[
|
|||||||
|
|
||||||
List of Dictionaries
|
List of Dictionaries
|
||||||
"""
|
"""
|
||||||
output = []
|
output: List = []
|
||||||
header_text = data.pop(0)
|
header_text: str = data.pop(0)
|
||||||
header_text = header_text + ' '
|
header_text = header_text + ' '
|
||||||
header_list = header_text.split()
|
header_list: List = header_text.split()
|
||||||
|
|
||||||
# find each column index and end position
|
# find each column index and end position
|
||||||
header_search = [header_list[0]]
|
header_search = [header_list[0]]
|
||||||
@ -96,7 +96,7 @@ def sparse_table_parse(data: List[str], delim: Optional[str] ='\u2063') -> List[
|
|||||||
h_end -= 1
|
h_end -= 1
|
||||||
|
|
||||||
# insert custom delimiter
|
# insert custom delimiter
|
||||||
entry = entry[:h_end] + delim + entry[h_end + 1:]
|
entry = f'{entry[:h_end]}{delim}{entry[h_end + 1:]}'
|
||||||
|
|
||||||
# create the entry list from the new custom delimiter
|
# create the entry list from the new custom delimiter
|
||||||
entry_list = entry.split(delim, maxsplit=len(header_list) - 1)
|
entry_list = entry.split(delim, maxsplit=len(header_list) - 1)
|
||||||
|
Reference in New Issue
Block a user