Skip to content

Commit bc53e40

Browse files
committed
fix typing issues
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent d92746c commit bc53e40

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/power_grid_model_ds/_core/utils/misc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def array_equal_with_nan(array1: np.ndarray, array2: np.ndarray) -> bool:
5050
if array1.dtype.names != array2.dtype.names:
5151
return False
5252

53-
for column in array1.dtype.names:
53+
columns: Sequence[str] = array1.dtype.names
54+
for column in columns:
5455
column_dtype = array1.dtype[column]
5556
if np.issubdtype(column_dtype, np.str_):
5657
if not np.array_equal(array1[column], array2[column]):

src/power_grid_model_ds/_core/visualizer/callbacks/element_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def display_selected_element(node_data, edge_data):
2727

2828
def _to_data_table(data: dict[str, Any]):
2929
columns = data.keys()
30-
data_table = dash_table.DataTable(
30+
data_table = dash_table.DataTable( # type: ignore[attr-defined]
3131
data=[data], columns=[{"name": key, "id": key} for key in columns], editable=False
3232
)
3333
return data_table

src/power_grid_model_ds/_core/visualizer/layout/cytoscape_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
placeholder="Select layout",
4747
value="",
4848
clearable=False,
49-
options=[{"label": name.capitalize(), "value": name} for name in LAYOUT_OPTIONS],
49+
options=[{"label": name.capitalize(), "value": name} for name in LAYOUT_OPTIONS], # type: ignore
5050
style={"width": "200px"},
5151
),
5252
style={"margin": "0 20px 0 10px"},

0 commit comments

Comments
 (0)