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 <[email protected]>
  • Loading branch information
gaborbernat committed Sep 30, 2024
1 parent ee45435 commit e3bf846
Show file tree
Hide file tree
Showing 24 changed files with 804 additions and 432 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 e3bf846

Please sign in to comment.