Skip to content

Commit d7f5df1

Browse files
committed
Apply dereferencing last when adding defaults
Dereferencing can only be done once both fields have been loaded which may happen only at this stage when adding defaults.
1 parent 59c2fe4 commit d7f5df1

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/changelist/_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def remote_config(gh: Github, org_repo: str, *, rev: str):
4646
content = ""
4747
config = tomllib.loads(content)
4848
config = config.get("tool", {}).get("changelist", {})
49-
config = _dereference_ignore_prs_by_username(config)
5049
return config
5150

5251

@@ -55,7 +54,6 @@ def local_config(path: Path) -> dict:
5554
with path.open("rb") as fp:
5655
config = tomllib.load(fp)
5756
config = config.get("tool", {}).get("changelist", {})
58-
config = _dereference_ignore_prs_by_username(config)
5957
return config
6058

6159

@@ -74,4 +72,5 @@ def add_config_defaults(
7472
if key not in config:
7573
config[key] = value
7674
logger.debug("using default config value for %s", key)
75+
config = _dereference_ignore_prs_by_username(config)
7776
return config

0 commit comments

Comments
 (0)