This repository was archived by the owner on May 17, 2024. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 10 files changed +16
-16
lines changed Expand file tree Collapse file tree 10 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ def dialect(self) -> "BaseDialect":
131131    def  compile (self , elem , params = None ) ->  str :
132132        return  self .dialect .compile (self , elem , params )
133133
134-     def  new_unique_name (self , prefix = "tmp" ):
134+     def  new_unique_name (self , prefix = "tmp" )  ->   str :
135135        self ._counter [0 ] +=  1 
136136        return  f"{ prefix } { self ._counter [0 ]}  " 
137137
Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ class Dialect(BaseDialect):
8585    def  random (self ) ->  str :
8686        return  "RAND()" 
8787
88-     def  quote (self , s : str ):
88+     def  quote (self , s : str )  ->   str :
8989        return  f"`{ s }  `" 
9090
91-     def  to_string (self , s : str ):
91+     def  to_string (self , s : str )  ->   str :
9292        return  f"cast({ s }   as string)" 
9393
9494    def  type_repr (self , t ) ->  str :
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ def type_repr(self, t) -> str:
6565        except  KeyError :
6666            return  super ().type_repr (t )
6767
68-     def  quote (self , s : str ):
68+     def  quote (self , s : str )  ->   str :
6969        return  f"`{ s }  `" 
7070
7171    def  to_string (self , s : str ) ->  str :
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class Dialect(BaseDialect):
7676        "json" : JSON ,
7777    }
7878
79-     def  quote (self , s : str ):
79+     def  quote (self , s : str )  ->   str :
8080        return  f"[{ s }  ]" 
8181
8282    def  set_timezone_to_utc (self ) ->  str :
@@ -93,7 +93,7 @@ def current_schema(self) -> str:
9393        FROM sys.database_principals 
9494        WHERE name = CURRENT_USER""" 
9595
96-     def  to_string (self , s : str ):
96+     def  to_string (self , s : str )  ->   str :
9797        # Both convert(varchar(max), …) and convert(text, …) do work. 
9898        return  f"CONVERT(VARCHAR(MAX), { s }  )" 
9999
Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ class Dialect(BaseDialect):
7070        "boolean" : Boolean ,
7171    }
7272
73-     def  quote (self , s : str ):
73+     def  quote (self , s : str )  ->   str :
7474        return  f"`{ s }  `" 
7575
76-     def  to_string (self , s : str ):
76+     def  to_string (self , s : str )  ->   str :
7777        return  f"cast({ s }   as char)" 
7878
7979    def  is_distinct_from (self , a : str , b : str ) ->  str :
Original file line number Diff line number Diff line change @@ -59,10 +59,10 @@ class Dialect(
5959    ROUNDS_ON_PREC_LOSS  =  True 
6060    PLACEHOLDER_TABLE  =  "DUAL" 
6161
62-     def  quote (self , s : str ):
62+     def  quote (self , s : str )  ->   str :
6363        return  f'"{ s }  "' 
6464
65-     def  to_string (self , s : str ):
65+     def  to_string (self , s : str )  ->   str :
6666        return  f"cast({ s }   as varchar(1024))" 
6767
6868    def  limit_select (
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class Dialect(BaseDialect):
6060    # https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/SQLReferenceManual/DataTypes/Numeric/NUMERIC.htm#Default 
6161    DEFAULT_NUMERIC_PRECISION  =  15 
6262
63-     def  quote (self , s : str ):
63+     def  quote (self , s : str )  ->   str :
6464        return  f'"{ s }  "' 
6565
6666    def  concat (self , items : List [str ]) ->  str :
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def parse_time_atom(count, unit):
5353    return  count , unit 
5454
5555
56- def  parse_time_delta (t : str ):
56+ def  parse_time_delta (t : str )  ->   timedelta :
5757    time_dict  =  {}
5858    while  t :
5959        m  =  TIME_RE .match (t )
@@ -70,5 +70,5 @@ def parse_time_delta(t: str):
7070    return  timedelta (** time_dict )
7171
7272
73- def  parse_time_before (time : datetime , delta : str ):
73+ def  parse_time_before (time : datetime , delta : str )  ->   datetime :
7474    return  time  -  parse_time_delta (delta )
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ def __attrs_post_init__(self) -> None:
138138                f"Error: min_update expected to be smaller than max_update! ({ self .min_update }   >= { self .max_update }  )" 
139139            )
140140
141-     def  _where (self ):
141+     def  _where (self )  ->   Optional [ str ] :
142142        return  f"({ self .where }  )"  if  self .where  else  None 
143143
144144    def  _with_raw_schema (self , raw_schema : Dict [str , RawColumnInfo ]) ->  Self :
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def disable_tracking() -> None:
8585    g_tracking_enabled  =  False 
8686
8787
88- def  is_tracking_enabled ():
88+ def  is_tracking_enabled ()  ->   bool :
8989    return  g_tracking_enabled 
9090
9191
@@ -114,7 +114,7 @@ def set_dbt_project_id(s) -> None:
114114    dbt_project_id  =  s 
115115
116116
117- def  get_anonymous_id ():
117+ def  get_anonymous_id ()  ->   str :
118118    global  g_anonymous_id 
119119    if  g_anonymous_id  is  None :
120120        profile  =  _load_profile ()
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments