Skip to content

Commit 259ed20

Browse files
committed
Applying requested changes for pull request
1 parent 682288a commit 259ed20

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

snakemake/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ def args_to_api(args, parser):
20552055
config=parse_config(args.config),
20562056
configfiles=args.configfile,
20572057
config_args=args.config,
2058-
replace_workflow=args.replace_workflow_config,
2058+
replace_workflow_config=args.replace_workflow_config,
20592059
),
20602060
storage_settings=storage_settings,
20612061
storage_provider_settings=storage_provider_settings,

snakemake/settings/types.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class ConfigSettings(SettingsBase):
348348
config: Mapping[str, str] = immutables.Map()
349349
configfiles: Sequence[Path] = tuple()
350350
config_args: Optional[str] = None
351-
replace_workflow: bool = False
351+
replace_workflow_config: bool = False
352352

353353
def __post_init__(self):
354354
self.overwrite_config = self._get_overwrite_config()
@@ -364,11 +364,6 @@ def _get_overwrite_config(self):
364364
update_config(overwrite_config, load_configfile(f))
365365
if self.config:
366366
update_config(overwrite_config, self.config)
367-
if self.replace_workflow and not overwrite_config:
368-
logger.warning(
369-
"--replace-workflow-config was used but no config entries are provided via "
370-
"command line. This flag will be ignored."
371-
)
372367
return overwrite_config
373368

374369
def _get_configfiles(self):

snakemake/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ def configfile(self, fp):
15481548
update_config(self.config, c)
15491549
if self.config_settings.overwrite_config:
15501550
merge_action = "extended"
1551-
if self.config_settings.replace_workflow:
1551+
if self.config_settings.replace_workflow_config:
15521552
# discard entire global config before merging
15531553
self.globals["config"] = {}
15541554
merge_action = "replaced"

0 commit comments

Comments
 (0)