From ff30c564024391c043851e804271930aedc18c80 Mon Sep 17 00:00:00 2001 From: Samuel Date: Mon, 11 Mar 2024 19:10:02 +0000 Subject: [PATCH] fixed flake8 --- lib/led_identifier.py | 2 +- lib/sfm/database_populator.py | 4 ++-- lib/sfm/sfm.py | 2 +- test/test_capture_sequence.py | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/led_identifier.py b/lib/led_identifier.py index 47007cc..fe80d6f 100644 --- a/lib/led_identifier.py +++ b/lib/led_identifier.py @@ -35,7 +35,7 @@ def find_led(self, image): max_dimension = max(image.shape) - return LedResults((center_x/max_dimension, center_y/max_dimension), contours) + return LedResults((center_x / max_dimension, center_y / max_dimension), contours) @staticmethod def draw_results(image, results): diff --git a/lib/sfm/database_populator.py b/lib/sfm/database_populator.py index f7f0a2a..014f315 100644 --- a/lib/sfm/database_populator.py +++ b/lib/sfm/database_populator.py @@ -27,8 +27,8 @@ def populate(db_path, input_directory, led_count=23, min_avg_points_per_view=100 for line in lines: led_id, u, v = line.split(",") - key_points[int(led_id)][0] = float(u)*2000 - key_points[int(led_id)][1] = float(v)*2000 + key_points[int(led_id)][0] = float(u) * 2000 + key_points[int(led_id)][1] = float(v) * 2000 total_keypoints += 1 diff --git a/lib/sfm/sfm.py b/lib/sfm/sfm.py index b9d054e..3baeeba 100644 --- a/lib/sfm/sfm.py +++ b/lib/sfm/sfm.py @@ -54,4 +54,4 @@ def save_points(self, filename): ) with open(filename, "w") as f: - f.write("\n".join(lines)) \ No newline at end of file + f.write("\n".join(lines)) diff --git a/test/test_capture_sequence.py b/test/test_capture_sequence.py index 733f328..ba5507b 100644 --- a/test/test_capture_sequence.py +++ b/test/test_capture_sequence.py @@ -45,8 +45,6 @@ def test_capture_sequence(): def test_capture_sequence_correctness(): - mock_camera = MockCamera() - for device_id in range(9): output_dir_full = os.path.join(os.getcwd(), "test", "scan") filename = f"capture_cam_{device_id}.csv"