aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/csvcmp.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/gn3/csvcmp.py b/gn3/csvcmp.py
index a525b91..35133dc 100644
--- a/gn3/csvcmp.py
+++ b/gn3/csvcmp.py
@@ -16,11 +16,9 @@ def remove_insignificant_edits(diff_data, epsilon=0.001):
original = mod.get("Original").split(",")
current = mod.get("Current").split(",")
for i, (x, y) in enumerate(zip(original, current)):
- if all([
- x.replace('.', '').isdigit(),
- y.replace('.', '').isdigit(),
- abs(float(x) - float(y)) < epsilon,
- ]):
+ if (x.replace('.', '').isdigit() and
+ y.replace('.', '').isdigit() and
+ abs(float(x) - float(y)) < epsilon):
current[i] = x
if not (__o := ",".join(original)) == (__c := ",".join(current)):
_mod.append({