Skip to content

Commit 7a842e1

Browse files
committed
fix code quality checks and copyright marks
Signed-off-by: leovsch leo.25.1996@gmail.com
1 parent 174958b commit 7a842e1

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

power_grid_model_c/power_grid_model/include/power_grid_model/common/matrix_utils.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
2+
//
3+
// SPDX-License-Identifier: MPL-2.0
24

35
#pragma once
46

power_grid_model_c/power_grid_model/include/power_grid_model/component/asym_line.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
2+
//
3+
// SPDX-License-Identifier: MPL-2.0
4+
15
#pragma once
26

37
#include <numeric>

power_grid_model_c/power_grid_model/include/power_grid_model/component/line_utils.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
2+
//
3+
// SPDX-License-Identifier: MPL-2.0
24

35
#pragma once
46

src/power_grid_model/validation/_rules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ def all_finite(data: SingleDataset, exceptions: dict[ComponentType, list[str]] |
750750
def no_strict_subset_missing(data: SingleDataset, fields : list[str], component_type : ComponentType):
751751
"""
752752
Helper function that generates missing value errors if a subset of the supplied fields are missing.
753-
If for an instance of component type all fields are missing or all fields are not missing then no error is returned for that instance.
753+
If for an instance of component type all fields are missing or all fields are not missing then,
754+
no error is returned for that instance.
754755
In any other case an error for that id is returned.
755756
756757
Args:
@@ -801,7 +802,8 @@ def not_all_missing(data: SingleDataset, fields : list[str], component_type : Co
801802
asym_axes = tuple(range(component_data.ndim, component_data[field].ndim))
802803
instances_with_all_nan_data = np.logical_and(instances_with_all_nan_data, np.any(np.isnan(component_data[field]) if np.isnan(nan_value) else np.equal(component_data[field], nan_value), axis=asym_axes))
803804

804-
ids = component_data["id"][instances_with_all_nan_data].flatten().tolist()
805+
ids_data = component_data["id"][instances_with_all_nan_data]
806+
ids = ids_data.flatten().tolist()
805807
if len(ids) > 0:
806808
errors.append(MultiFieldValidationError(component_type, fields, ids))
807809

src/power_grid_model/validation/_validation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import copy
1515
from collections.abc import Sized as ABCSized
1616
from itertools import chain
17-
from typing import List
1817

1918
import numpy as np
2019

0 commit comments

Comments
 (0)