Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/compwa_policy/check_dev_files/upgrade_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@ def _update_precommit_schedule(
if ci_section is None:
return
key = "autoupdate_schedule"
if key not in ci_section:
return
if get_dependabot_ecosystems() & __TRIGGER_ECOSYSTEMS:
del ci_section[key]
frequency = "quarterly"
if ci_section.get(key) == frequency:
return
ci_section[key] = "quarterly"
precommit.changelog.append(
"Deactivated pre-commit autoupdate schedule, because it is already"
f" triggered by the {CONFIG_PATH.github_workflow_dir / 'lock.yml'}."
"Set pre-commit autoupdate schedule to quarterly (maximum), because the"
" schedule is now determined by Dependabot"
)
else:
if frequency == "semiannually":
Expand Down
2 changes: 1 addition & 1 deletion src/compwa_policy/utilities/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _determine_new_value(old: V, new: V, sort: bool = False) -> V:
if isinstance(old, dict) and isinstance(new, dict):
return _update_dict_recursively(old, new, sort) # ty:ignore[invalid-return-type]
if isinstance(old, list) and isinstance(new, list):
return sorted({*old, *new}) # ty:ignore[invalid-argument-type]
return sorted({*old, *new}) # ty:ignore[invalid-return-type]
return new


Expand Down