mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
change multiple or statements to any()
This commit is contained in:
@ -104,6 +104,7 @@ def _strip(string: str) -> str:
|
|||||||
string = _rstrip(string)
|
string = _rstrip(string)
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
||||||
def _table_sniff(string: str) -> str:
|
def _table_sniff(string: str) -> str:
|
||||||
"""Find the table-type via heuristics"""
|
"""Find the table-type via heuristics"""
|
||||||
# pretty tables
|
# pretty tables
|
||||||
@ -127,14 +128,16 @@ def _table_sniff(string: str) -> str:
|
|||||||
def _is_separator(line: str) -> bool:
|
def _is_separator(line: str) -> bool:
|
||||||
"""Returns true if a table separator line is found"""
|
"""Returns true if a table separator line is found"""
|
||||||
strip_line = line.strip()
|
strip_line = line.strip()
|
||||||
if strip_line.startswith('╒═') and strip_line.endswith('═╕')\
|
if any((
|
||||||
or strip_line.startswith('╞═') and strip_line.endswith('═╡')\
|
strip_line.startswith('╒═') and strip_line.endswith('═╕'),
|
||||||
or strip_line.startswith('╘═') and strip_line.endswith('═╛')\
|
strip_line.startswith('╞═') and strip_line.endswith('═╡'),
|
||||||
or strip_line.startswith('┌─') and strip_line.endswith('─┐')\
|
strip_line.startswith('╘═') and strip_line.endswith('═╛'),
|
||||||
or strip_line.startswith('├─') and strip_line.endswith('─┤')\
|
strip_line.startswith('┌─') and strip_line.endswith('─┐'),
|
||||||
or strip_line.startswith('└─') and strip_line.endswith('─┘')\
|
strip_line.startswith('├─') and strip_line.endswith('─┤'),
|
||||||
or strip_line.startswith('+=') and strip_line.endswith('=+')\
|
strip_line.startswith('└─') and strip_line.endswith('─┘'),
|
||||||
or strip_line.startswith('+-') and strip_line.endswith('-+'):
|
strip_line.startswith('+=') and strip_line.endswith('=+'),
|
||||||
|
strip_line.startswith('+-') and strip_line.endswith('-+')
|
||||||
|
)):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user