@@ -254,9 +254,10 @@ class GenericContext(BaseContext, t.Generic[C]):
254254 config_type: The type of config object to use (default Config).
255255 """
256256
257+ CONFIG_TYPE : t .Type [C ]
258+
257259 def __init__ (
258260 self ,
259- config_type : t .Type [C ],
260261 engine_adapter : t .Optional [EngineAdapter ] = None ,
261262 notification_targets : t .Optional [t .List [NotificationTarget ]] = None ,
262263 state_sync : t .Optional [StateSync ] = None ,
@@ -271,7 +272,7 @@ def __init__(
271272 ):
272273 self .console = console or get_console ()
273274 self .configs = (
274- config if isinstance (config , dict ) else load_configs (config , config_type , paths )
275+ config if isinstance (config , dict ) else load_configs (config , self . CONFIG_TYPE , paths )
275276 )
276277 self .dag : DAG [str ] = DAG ()
277278 self ._models : UniqueKeyDict [str , Model ] = UniqueKeyDict ("models" )
@@ -1762,5 +1763,4 @@ def _register_notification_targets(self) -> None:
17621763
17631764
17641765class Context (GenericContext [Config ]):
1765- def __init__ (self , * args : t .Any , ** kwargs : t .Any ):
1766- super ().__init__ (Config , * args , ** kwargs )
1766+ CONFIG_TYPE = Config
0 commit comments