Skip to content

Commit

Permalink
Implement string replacement
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Sep 30, 2024
1 parent ee45435 commit 57c4e5c
Show file tree
Hide file tree
Showing 25 changed files with 889 additions and 440 deletions.
6 changes: 4 additions & 2 deletions src/tox/config/loader/ini/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from tox.config.loader.api import ConfigLoadArgs, Loader, Override
from tox.config.loader.ini.factor import filter_for_env
from tox.config.loader.ini.replace import replace
from tox.config.loader.ini.replace import ReplaceReferenceIni
from tox.config.loader.replacer import replace
from tox.config.loader.str_convert import StrConvert
from tox.config.set_env import SetEnv
from tox.report import HandledError
Expand Down Expand Up @@ -71,8 +72,9 @@ def replacer(raw_: str, args_: ConfigLoadArgs) -> str:
if conf is None:
replaced = raw_ # no replacement supported in the core section
else:
reference_replacer = ReplaceReferenceIni(conf, self)
try:
replaced = replace(conf, self, raw_, args_) # do replacements
replaced = replace(conf, reference_replacer, raw_, args_) # do replacements
except Exception as exception:
if isinstance(exception, HandledError):
raise
Expand Down
Loading

0 comments on commit 57c4e5c

Please sign in to comment.