mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
pep584ify: use dict merge operator (#10279)
This was introduced in Python 3.9. The change makes dict merges 'obvious' and looks cleaner. I haven't changed `.update()` to `|=` (update operator), as I find the former to be more readable and "obvious".
This commit is contained in:
@@ -6,7 +6,7 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
def issubset(subset: dict, superset: dict) -> bool:
|
||||
assert superset == {**superset, **subset}
|
||||
assert superset == superset | subset
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user