فهرست منبع

Apply ruff to tests/

Kentaro Wada 1 سال پیش
والد
کامیت
cdea31352e
2فایلهای تغییر یافته به همراه5 افزوده شده و 7 حذف شده
  1. 3 1
      tests/labelme_tests/test_app.py
  2. 2 6
      tests/labelme_tests/widgets_tests/test_label_dialog.py

+ 3 - 1
tests/labelme_tests/test_app.py

@@ -83,7 +83,9 @@ def test_MainWindow_annotate_jpg(qtbot):
 
     config = labelme.config.get_default_config()
     win = labelme.app.MainWindow(
-        config=config, filename=input_file, output_file=out_file,
+        config=config,
+        filename=input_file,
+        output_file=out_file,
     )
     qtbot.addWidget(win)
     _win_show_and_wait_imageData(qtbot, win)

+ 2 - 6
tests/labelme_tests/widgets_tests/test_label_dialog.py

@@ -54,9 +54,7 @@ def test_LabelDialog_popUp(qtbot):
     # popUp(text='cat')
 
     def interact():
-        qtbot.keyClick(
-            widget.edit, QtCore.Qt.Key_P
-        )  # enter 'p' for 'person'  # NOQA
+        qtbot.keyClick(widget.edit, QtCore.Qt.Key_P)  # enter 'p' for 'person'  # NOQA
         qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter)  # NOQA
         qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter)  # NOQA
 
@@ -83,9 +81,7 @@ def test_LabelDialog_popUp(qtbot):
     # popUp() + key_Up
 
     def interact():
-        qtbot.keyClick(
-            widget.edit, QtCore.Qt.Key_Up
-        )  # 'person' -> 'dog'  # NOQA
+        qtbot.keyClick(widget.edit, QtCore.Qt.Key_Up)  # 'person' -> 'dog'  # NOQA
         qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter)  # NOQA
         qtbot.keyClick(widget.edit, QtCore.Qt.Key_Enter)  # NOQA