From 37bac2af0d2adef3d0bb3ab555818b18a5ec6cf9 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 29 Jul 2024 18:09:47 -0700 Subject: [PATCH] simplify a comparison --- fatamorgana/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fatamorgana/basic.py b/fatamorgana/basic.py index 315e377..fee40dc 100644 --- a/fatamorgana/basic.py +++ b/fatamorgana/basic.py @@ -1342,7 +1342,7 @@ class GridRepetition: return True if self.b_vector is None or other.b_vector is None: return False - if any(self.b_vector[ii] != other.b_vector[ii] for ii in range(2)): + if any(self.b_vector[ii] != other.b_vector[ii] for ii in range(2)): # noqa: SIM103 return False return True @@ -1580,7 +1580,7 @@ def read_point_list( assert (dx == 0) or (dy == 0) close_points = [[-dx, -dy]] elif list_type == 3: - assert (dx == 0) or (dy == 0) or (dx == dy) or (dx == -dy) + assert 0 in (dx, dy) or dx in (dy, -dy) close_points = [[-dx, -dy]] else: close_points = [[-dx, -dy]]