In Starlark, when you merge dictionaries using the | operator, the keys from the left-hand side (LHS) dictionary take precedence over the keys from the right-hand side (RHS) dictionary. This behavior might not be what you expect if you want the RHS keys to override the LHS keys.
In this approach, tools.update(lock_dict) will update the tools dictionary with the key-value pairs from lock_dict, and if any keys are already present in tools, their values will be overwritten by the corresponding values from lock_dict.
In Starlark, when you merge dictionaries using the | operator, the keys from the left-hand side (LHS) dictionary take precedence over the keys from the right-hand side (RHS) dictionary. This behavior might not be what you expect if you want the RHS keys to override the LHS keys.
In this approach, tools.update(lock_dict) will update the tools dictionary with the key-value pairs from lock_dict, and if any keys are already present in tools, their values will be overwritten by the corresponding values from lock_dict.