Improve needs_rewrite detection.

This commit is contained in:
voussoir 2021-09-30 16:19:46 -07:00
parent c1edd8fc33
commit a3ddeb8e09
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -64,7 +64,7 @@ def layer_json(target, supply):
'''
target_keys = recursive_dict_keys(target)
supply_keys = recursive_dict_keys(supply)
needs_rewrite = target_keys > supply_keys
needs_rewrite = len(target_keys.difference(supply_keys)) > 0
recursive_dict_update(target=target, supply=supply)
return (target, needs_rewrite)