77import  platform 
88import  sys 
99from  pathlib  import  Path 
10- from  typing  import  TYPE_CHECKING , Any , Callable 
10+ from  typing  import  TYPE_CHECKING , Any , Callable ,  Optional 
1111
1212import  jinja2 
1313import  typer 
7474@catch_exception (console = console ) 
7575def  check (
7676    check_name : str  =  typer .Argument (default = "" , help = "Name of the Python check" ),
77-     branch : str   |   None  =  None ,
77+     branch : Optional [ str ]  =  None ,
7878    path : str  =  typer .Option ("." , help = "Root directory" ),
7979    debug : bool  =  False ,
8080    format_json : bool  =  False ,
8181    _ : str  =  CONFIG_PARAM ,
8282    list_available : bool  =  typer .Option (False , "--list" , help = "Show available Python checks" ),
83-     variables : list [str ]  |   None  =  typer .Argument (
83+     variables : Optional [ list [str ]]  =  typer .Argument (
8484        None , help = "Variables to pass along with the query. Format key=value key=value." 
8585    ),
8686) ->  None :
@@ -102,12 +102,12 @@ def check(
102102@catch_exception (console = console ) 
103103async  def  generator (
104104    generator_name : str  =  typer .Argument (default = "" , help = "Name of the Generator" ),
105-     branch : str   |   None  =  None ,
105+     branch : Optional [ str ]  =  None ,
106106    path : str  =  typer .Option ("." , help = "Root directory" ),
107107    debug : bool  =  False ,
108108    _ : str  =  CONFIG_PARAM ,
109109    list_available : bool  =  typer .Option (False , "--list" , help = "Show available Generators" ),
110-     variables : list [str ]  |   None  =  typer .Argument (
110+     variables : Optional [ list [str ]]  =  typer .Argument (
111111        None , help = "Variables to pass along with the query. Format key=value key=value." 
112112    ),
113113) ->  None :
@@ -130,13 +130,13 @@ async def run(
130130    debug : bool  =  False ,
131131    _ : str  =  CONFIG_PARAM ,
132132    branch : str  =  typer .Option ("main" , help = "Branch on which to run the script." ),  # TODO: Replace main by None 
133-     concurrent : int   |   None  =  typer .Option (
133+     concurrent : Optional [ int ]  =  typer .Option (
134134        None ,
135135        help = "Maximum number of requests to execute at the same time." ,
136136        envvar = "INFRAHUB_MAX_CONCURRENT_EXECUTION" ,
137137    ),
138138    timeout : int  =  typer .Option (60 , help = "Timeout in sec" , envvar = "INFRAHUB_TIMEOUT" ),
139-     variables : list [str ]  |   None  =  typer .Argument (
139+     variables : Optional [ list [str ]]  =  typer .Argument (
140140        None , help = "Variables to pass along with the query. Format key=value key=value." 
141141    ),
142142) ->  None :
@@ -259,7 +259,7 @@ def _run_transform(
259259@catch_exception (console = console ) 
260260def  render (
261261    transform_name : str  =  typer .Argument (default = "" , help = "Name of the Python transformation" , show_default = False ),
262-     variables : list [str ]  |   None  =  typer .Argument (
262+     variables : Optional [ list [str ]]  =  typer .Argument (
263263        None , help = "Variables to pass along with the query. Format key=value key=value." 
264264    ),
265265    branch : str  =  typer .Option (None , help = "Branch on which to render the transform." ),
@@ -309,7 +309,7 @@ def render(
309309@catch_exception (console = console ) 
310310def  transform (
311311    transform_name : str  =  typer .Argument (default = "" , help = "Name of the Python transformation" , show_default = False ),
312-     variables : list [str ]  |   None  =  typer .Argument (
312+     variables : Optional [ list [str ]]  =  typer .Argument (
313313        None , help = "Variables to pass along with the query. Format key=value key=value." 
314314    ),
315315    branch : str  =  typer .Option (None , help = "Branch on which to run the transformation" ),
0 commit comments