From c8fc6d765e3694b8ad58d7d16ec959082852363d Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Tue, 1 Oct 2024 14:22:34 +0300 Subject: [PATCH] Apply Ruff format --- labelme/utils/shape.py | 4 +--- labelme/widgets/unique_label_qlist_widget.py | 1 - tests/labelme_tests/widgets_tests/test_label_list_widget.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/labelme/utils/shape.py b/labelme/utils/shape.py index a8b1cc9f7..35160f42a 100644 --- a/labelme/utils/shape.py +++ b/labelme/utils/shape.py @@ -97,9 +97,7 @@ def masks_to_bboxes(masks): if masks.ndim != 3: raise ValueError(f"masks.ndim must be 3, but it is {masks.ndim}") if masks.dtype != bool: - raise ValueError( - f"masks.dtype must be bool type, but it is {masks.dtype}" - ) + raise ValueError(f"masks.dtype must be bool type, but it is {masks.dtype}") bboxes = [] for mask in masks: where = np.argwhere(mask) diff --git a/labelme/widgets/unique_label_qlist_widget.py b/labelme/widgets/unique_label_qlist_widget.py index 48ed4c2d3..5d858397f 100644 --- a/labelme/widgets/unique_label_qlist_widget.py +++ b/labelme/widgets/unique_label_qlist_widget.py @@ -1,4 +1,3 @@ - import html from qtpy import QtWidgets diff --git a/tests/labelme_tests/widgets_tests/test_label_list_widget.py b/tests/labelme_tests/widgets_tests/test_label_list_widget.py index f62d3b566..fa9f420e6 100644 --- a/tests/labelme_tests/widgets_tests/test_label_list_widget.py +++ b/tests/labelme_tests/widgets_tests/test_label_list_widget.py @@ -1,4 +1,3 @@ - import pytest from labelme.widgets import LabelListWidget