Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
rmatsuda committed Oct 1, 2024
1 parent 7c5d7a1 commit c773af8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions invesalius/data/visualization/mep_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,18 @@ def _FilterMarkers(self, markers_list):
markers.append(marker.to_dict())

# Find objects in the new list that are not in the old list (added)
added_objects = [new_obj for new_obj in markers if
not any((new_obj == old_obj) for old_obj in self.marker_storage)]
added_objects = [
new_obj
for new_obj in markers
if not any((new_obj == old_obj) for old_obj in self.marker_storage)
]

# Find objects in the old list that are not in the new list (removed)
removed_objects = [old_obj for old_obj in self.marker_storage if
not any((old_obj == new_obj) for new_obj in markers)]
removed_objects = [
old_obj
for old_obj in self.marker_storage
if not any((old_obj == new_obj) for new_obj in markers)
]

# Check if the lists have changed
if not bool(added_objects or removed_objects):
Expand Down

0 comments on commit c773af8

Please sign in to comment.