fix: support python 3.9 union type hinting

This commit is contained in:
KingND 2024-09-07 16:01:52 -04:00
parent 53cab5074b
commit 69678574d4

View File

@ -1,7 +1,7 @@
import logging import logging
import time import time
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List from typing import Any, Dict, List, Union
import pandas as pd import pandas as pd
from rich.text import Text from rich.text import Text
@ -21,7 +21,7 @@ class LookaheadAnalysisSubFunctions:
def text_table_lookahead_analysis_instances( def text_table_lookahead_analysis_instances(
config: Dict[str, Any], config: Dict[str, Any],
lookahead_instances: List[LookaheadAnalysis], lookahead_instances: List[LookaheadAnalysis],
caption: str | None = None, caption: Union[str, None] = None,
): ):
headers = [ headers = [
"filename", "filename",
@ -246,7 +246,7 @@ class LookaheadAnalysisSubFunctions:
# report the results # report the results
if lookaheadAnalysis_instances: if lookaheadAnalysis_instances:
caption: str | None = None caption: Union[str, None] = None
if any([ if any([
any([ any([
indicator.startswith("&") indicator.startswith("&")