Skip to content

Commit 6f6167d

Browse files
committed
fix quality issues
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent efecd13 commit 6f6167d

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ repos:
66
- repo: local
77
hooks:
88
- id: quality-checks
9-
name: Run all quality checks
9+
name: Running 'poe all --check'
1010
entry: poe all --check
1111
language: system
12-
types: [python]
12+
types: [python]
13+
always_run: true
14+
pass_filenames: false

src/power_grid_model_ds/_core/model/arrays/base/_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _determine_column_widths(array: "FancyArray") -> list[tuple[str, int]]:
8282
def _center_and_truncate(string: str, width: int) -> str:
8383
if len(string) <= width:
8484
return string.center(width)
85-
return f"{string[:width - 2]}..".center(width)
85+
return f"{string[: width - 2]}..".center(width)
8686

8787

8888
def _get_start_and_end_rows(array: "FancyArray", rows: int) -> tuple["FancyArray", Optional["FancyArray"]]:

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/header_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class LayoutOptions(Enum):
5353
placeholder="Select layout",
5454
value=LayoutOptions.BREADTHFIRST.value,
5555
clearable=False,
56-
options=[{"label": option.value, "value": option.value} for option in LayoutOptions],
56+
options=[{"label": option.value, "value": option.value} for option in LayoutOptions], # type: ignore[arg-type]
5757
style={"width": "200px"},
5858
),
5959
style={"margin": "0 20px 0 10px", "color": "black"},

0 commit comments

Comments
 (0)