File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
src/tox/config/loader/toml Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,14 @@ def build( # noqa: PLR0913
6868 delay_replace = inspect .isclass (of_type ) and issubclass (of_type , SetEnv )
6969
7070 def replacer (raw_ : str , args_ : ConfigLoadArgs ) -> str :
71- if conf is None :
72- replaced = raw_ # no replacement supported in the core section
73- else :
74- reference_replacer = Unroll (conf , self , args )
75- try :
76- replaced = str (reference_replacer (raw_ )) # do replacements
77- except Exception as exception :
78- if isinstance (exception , HandledError ):
79- raise
80- msg = f"replace failed in { args_ .env_name } .{ key } with { exception !r} "
81- raise HandledError (msg ) from exception
71+ reference_replacer = Unroll (conf , self , args )
72+ try :
73+ replaced = str (reference_replacer (raw_ )) # do replacements
74+ except Exception as exception :
75+ if isinstance (exception , HandledError ):
76+ raise
77+ msg = f"replace failed in { args_ .env_name } .{ key } with { exception !r} "
78+ raise HandledError (msg ) from exception
8279 return replaced
8380
8481 exploded = Unroll (conf = conf , loader = self , args = args )(raw )
You can’t perform that action at this time.
0 commit comments