@@ -854,7 +854,7 @@ def __setattr__(
854
854
855
855
# Define UI callbacks
856
856
# region
857
- def res_switch_cb (attr : str , old : int , new : int ) -> None : # noqa: ARG001
857
+ def res_switch_cb (attr : str , old : int , new : int ) -> None :
858
858
"""Callback to switch between resolutions."""
859
859
if new == 0 :
860
860
UI ["vstate" ].res = 1
@@ -864,7 +864,7 @@ def res_switch_cb(attr: str, old: int, new: int) -> None: # noqa: ARG001
864
864
UI ["vstate" ].to_update .update (["overlay" , "slide" ])
865
865
866
866
867
- def slide_toggle_cb (attr : str ) -> None : # noqa: ARG001
867
+ def slide_toggle_cb (attr : str ) -> None :
868
868
"""Callback to toggle the slide on/off."""
869
869
if UI ["p" ].renderers [0 ].alpha == 0 :
870
870
UI ["p" ].renderers [0 ].alpha = UI ["slide_alpha" ].value
@@ -877,7 +877,7 @@ def node_select_cb(attr: str, old: int, new: int) -> None:
877
877
# Do something on node select if desired
878
878
879
879
880
- def overlay_toggle_cb (attr : str ) -> None : # noqa: ARG001
880
+ def overlay_toggle_cb (attr : str ) -> None :
881
881
"""Callback to toggle the overlay on/off."""
882
882
for i in range (5 , len (UI ["p" ].renderers )):
883
883
if UI ["p" ].renderers [i ].alpha == 0 :
@@ -935,14 +935,14 @@ def populate_slide_list(slide_folder: Path, search_txt: str | None = None) -> No
935
935
UI ["slide_select" ].options = file_list
936
936
937
937
938
- def filter_input_cb (attr : str , old : str , new : str ) -> None : # noqa: ARG001 # skipcq: PYL-W0613
938
+ def filter_input_cb (attr : str , old : str , new : str ) -> None : # skipcq: PYL-W0613
939
939
"""Change predicate to be used to filter annotations."""
940
940
build_predicate ()
941
941
UI ["vstate" ].update_state = 1
942
942
UI ["vstate" ].to_update .update (["overlay" ])
943
943
944
944
945
- def cprop_input_cb (attr : str , old : str , new : list [str ]) -> None : # noqa: ARG001 # skipcq: PYL-W0613
945
+ def cprop_input_cb (attr : str , old : str , new : list [str ]) -> None : # skipcq: PYL-W0613
946
946
"""Change property to color by."""
947
947
if len (new ) == 0 :
948
948
return
@@ -957,30 +957,30 @@ def cprop_input_cb(attr: str, old: str, new: list[str]) -> None: # noqa: ARG001
957
957
UI ["vstate" ].to_update .update (["overlay" ])
958
958
959
959
960
- def slide_alpha_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
960
+ def slide_alpha_cb (attr : str , old : float , new : float ) -> None :
961
961
"""Callback to change the alpha of the slide."""
962
962
UI ["p" ].renderers [0 ].alpha = new
963
963
964
964
965
- def overlay_alpha_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
965
+ def overlay_alpha_cb (attr : str , old : float , new : float ) -> None :
966
966
"""Callback to change the alpha of all overlay layers."""
967
967
for i in range (5 , len (UI ["p" ].renderers )):
968
968
UI ["p" ].renderers [i ].alpha = new
969
969
970
970
971
- def pt_size_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
971
+ def pt_size_cb (attr : str , old : float , new : float ) -> None :
972
972
"""Callback to change the size of the points."""
973
973
UI ["vstate" ].graph_node .radius = 2 * new
974
974
975
975
976
- def edge_size_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
976
+ def edge_size_cb (attr : str , old : float , new : float ) -> None :
977
977
"""Callback to change the size of the edges."""
978
978
update_renderer ("edge_thickness" , new )
979
979
UI ["vstate" ].update_state = 1
980
980
UI ["vstate" ].to_update .update (["overlay" ])
981
981
982
982
983
- def opt_buttons_cb (attr : str , old : list [int ], new : list [int ]) -> None : # noqa: ARG001
983
+ def opt_buttons_cb (attr : str , old : list [int ], new : list [int ]) -> None :
984
984
"""Callback to handle options changes in the ui widget."""
985
985
old_thickness = UI ["vstate" ].thickness
986
986
if FILLED in new :
@@ -1008,22 +1008,22 @@ def opt_buttons_cb(attr: str, old: list[int], new: list[int]) -> None: # noqa:
1008
1008
UI ["p" ].xgrid .grid_line_alpha = 0
1009
1009
1010
1010
1011
- def cmap_select_cb (attr : str , old : str , new : str ) -> None : # noqa: ARG001
1011
+ def cmap_select_cb (attr : str , old : str , new : str ) -> None :
1012
1012
"""Callback to change the color map."""
1013
1013
if not (UI ["vstate" ].is_categorical and new != "dict" ):
1014
1014
update_renderer ("mapper" , new )
1015
1015
UI ["vstate" ].update_state = 1
1016
1016
UI ["vstate" ].to_update .update (["overlay" ])
1017
1017
1018
1018
1019
- def blur_spinner_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
1019
+ def blur_spinner_cb (attr : str , old : float , new : float ) -> None :
1020
1020
"""Callback to change the blur radius."""
1021
1021
update_renderer ("blur_radius" , new )
1022
1022
UI ["vstate" ].update_state = 1
1023
1023
UI ["vstate" ].to_update .update (["overlay" ])
1024
1024
1025
1025
1026
- def scale_spinner_cb (attr : str , old : float , new : float ) -> None : # noqa: ARG001
1026
+ def scale_spinner_cb (attr : str , old : float , new : float ) -> None :
1027
1027
"""Callback to change the max scale.
1028
1028
1029
1029
This defines a scale above which small annotations are
@@ -1035,7 +1035,7 @@ def scale_spinner_cb(attr: str, old: float, new: float) -> None: # noqa: ARG001
1035
1035
UI ["vstate" ].to_update .update (["overlay" ])
1036
1036
1037
1037
1038
- def slide_select_cb (attr : str , old : str , new : str ) -> None : # noqa: ARG001
1038
+ def slide_select_cb (attr : str , old : str , new : str ) -> None :
1039
1039
"""Set up the newly chosen slide."""
1040
1040
if len (new ) == 0 :
1041
1041
return
@@ -1200,14 +1200,14 @@ def layer_drop_cb(attr: MenuItemClick) -> None:
1200
1200
change_tiles (resp )
1201
1201
1202
1202
1203
- def layer_select_cb (attr : ButtonClick ) -> None : # noqa: ARG001
1203
+ def layer_select_cb (attr : ButtonClick ) -> None :
1204
1204
"""Callback to handle toggling specific annotation types on and off."""
1205
1205
build_predicate ()
1206
1206
UI ["vstate" ].update_state = 1
1207
1207
UI ["vstate" ].to_update .update (["overlay" ])
1208
1208
1209
1209
1210
- def fixed_layer_select_cb (obj : Button , attr : ButtonClick ) -> None : # noqa: ARG001
1210
+ def fixed_layer_select_cb (obj : Button , attr : ButtonClick ) -> None :
1211
1211
"""Callback to handle toggling non-annotation layers on and off."""
1212
1212
key = UI ["vstate" ].layer_dict [obj .label ]
1213
1213
if obj .label == "edges" :
@@ -1231,8 +1231,8 @@ def fixed_layer_select_cb(obj: Button, attr: ButtonClick) -> None: # noqa: ARG0
1231
1231
1232
1232
def layer_slider_cb (
1233
1233
obj : Slider ,
1234
- attr : str , # noqa: ARG001
1235
- old : float , # noqa: ARG001
1234
+ attr : str ,
1235
+ old : float ,
1236
1236
new : float ,
1237
1237
) -> None :
1238
1238
"""Callback to handle changing the alpha of a layer."""
@@ -1251,8 +1251,8 @@ def layer_slider_cb(
1251
1251
1252
1252
def color_input_cb (
1253
1253
obj : ColorPicker ,
1254
- attr : str , # noqa: ARG001
1255
- old : str , # noqa: ARG001
1254
+ attr : str ,
1255
+ old : str ,
1256
1256
new : str ,
1257
1257
) -> None :
1258
1258
"""Callback to handle changing the color of an annotation type."""
@@ -1283,12 +1283,12 @@ def wrapped(attr: ButtonClick) -> None:
1283
1283
return wrapped
1284
1284
1285
1285
1286
- def model_drop_cb (attr : str , old : str , new : str ) -> None : # noqa: ARG001
1286
+ def model_drop_cb (attr : str , old : str , new : str ) -> None :
1287
1287
"""Callback to handle model selection."""
1288
1288
UI ["vstate" ].current_model = new
1289
1289
1290
1290
1291
- def to_model_cb (attr : ButtonClick ) -> None : # noqa: ARG001
1291
+ def to_model_cb (attr : ButtonClick ) -> None :
1292
1292
"""Callback to run currently selected model."""
1293
1293
if UI ["vstate" ].current_model == "hovernet" :
1294
1294
segment_on_box ()
@@ -1297,7 +1297,7 @@ def to_model_cb(attr: ButtonClick) -> None: # noqa: ARG001
1297
1297
logger .warning ("unknown model" )
1298
1298
1299
1299
1300
- def type_cmap_cb (attr : str , old : list [str ], new : list [str ]) -> None : # noqa: ARG001
1300
+ def type_cmap_cb (attr : str , old : list [str ], new : list [str ]) -> None :
1301
1301
"""Callback to handle changing a type-specific color property."""
1302
1302
if len (new ) == 0 :
1303
1303
# Remove type-specific coloring
@@ -1362,7 +1362,7 @@ def type_cmap_cb(attr: str, old: list[str], new: list[str]) -> None: # noqa: AR
1362
1362
UI ["vstate" ].to_update .update (["overlay" ])
1363
1363
1364
1364
1365
- def save_cb (attr : ButtonClick ) -> None : # noqa: ARG001
1365
+ def save_cb (attr : ButtonClick ) -> None :
1366
1366
"""Callback to handle saving annotations."""
1367
1367
save_path = make_safe_name (
1368
1368
str (
@@ -2132,7 +2132,7 @@ def update() -> None:
2132
2132
UI ["vstate" ].update_state = DO_UPDATE
2133
2133
2134
2134
2135
- def control_tabs_cb (attr : str , old : int , new : int ) -> None : # noqa: ARG001
2135
+ def control_tabs_cb (attr : str , old : int , new : int ) -> None :
2136
2136
"""Callback to handle selecting active window."""
2137
2137
if new == 1 and len (slide_wins .children ) == 1 :
2138
2138
# Make new window
@@ -2154,8 +2154,8 @@ def control_tabs_cb(attr: str, old: int, new: int) -> None: # noqa: ARG001
2154
2154
2155
2155
2156
2156
def control_tabs_remove_cb (
2157
- attr : str , # noqa: ARG001
2158
- old : list [int ], # noqa: ARG001
2157
+ attr : str ,
2158
+ old : list [int ],
2159
2159
new : list [int ],
2160
2160
) -> None :
2161
2161
"""Callback to handle removing a window."""
0 commit comments