Skip to content

Commit

Permalink
Working on diff
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Dec 7, 2023
1 parent fac9916 commit ee1c221
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions osxphotos/dictdiff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Perform diffs of dictionaries"""

from __future__ import annotations

from typing import Any

import dictdiffer

def dictdiff(a: dict[Any, Any], b: dict[Any, Any]) -> list[tuple[Any, ...]]:
"""Return list of differences between two dictionaries
"""
return list(dictdiffer.diff(a, b, tolerance=0.01))

0 comments on commit ee1c221

Please sign in to comment.