Skip to content

Commit faab0a8

Browse files
style: apply automated linter fixes
1 parent af06e73 commit faab0a8

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

src/safeds/exceptions/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
from ._ml import (
1717
DatasetMissesDataError,
1818
DatasetMissesFeaturesError,
19-
TargetDataMismatchError,
2019
FeatureDataMismatchError,
2120
InputSizeError,
2221
InvalidModelStructureError,
2322
LearningError,
2423
ModelNotFittedError,
2524
PlainTableError,
2625
PredictionError,
26+
TargetDataMismatchError,
2727
)
2828

2929

src/safeds/exceptions/_ml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ class TargetDataMismatchError(ValueError):
3030
"""
3131

3232
def __init__(self, actual_target_name: str, missing_target_name: str):
33-
super().__init__(f"The provided target column '{actual_target_name}' does not match the target column of the training set '{missing_target_name}'.")
33+
super().__init__(
34+
f"The provided target column '{actual_target_name}' does not match the target column of the training set '{missing_target_name}'.",
35+
)
3436

3537

3638
class DatasetMissesDataError(ValueError):

src/safeds/ml/classical/classification/_baseline_classifier.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from safeds.data.labeled.containers import TabularDataset
77
from safeds.exceptions import (
88
DatasetMissesDataError,
9-
TargetDataMismatchError,
109
FeatureDataMismatchError,
1110
ModelNotFittedError,
11+
TargetDataMismatchError,
1212
)
1313
from safeds.ml.classical.classification import (
1414
AdaBoostClassifier,
@@ -140,7 +140,9 @@ def predict(self, test_data: TabularDataset) -> dict[str, float]:
140140
if not self._feature_names == test_data.features.column_names:
141141
raise FeatureDataMismatchError
142142
if not self._target_name == test_data.target.name:
143-
raise TargetDataMismatchError(actual_target_name=test_data.target.name, missing_target_name=self._target_name)
143+
raise TargetDataMismatchError(
144+
actual_target_name=test_data.target.name, missing_target_name=self._target_name,
145+
)
144146
test_data_as_table = test_data.to_table()
145147
if test_data_as_table.row_count == 0:
146148
raise DatasetMissesDataError

src/safeds/ml/classical/regression/_baseline_regressor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from safeds.data.labeled.containers import TabularDataset
77
from safeds.exceptions import (
88
DatasetMissesDataError,
9-
TargetDataMismatchError,
109
FeatureDataMismatchError,
1110
ModelNotFittedError,
11+
TargetDataMismatchError,
1212
)
1313
from safeds.ml.classical.regression import (
1414
AdaBoostRegressor,
@@ -149,7 +149,9 @@ def predict(self, test_data: TabularDataset) -> dict[str, float]:
149149
if not self._feature_names == test_data.features.column_names:
150150
raise FeatureDataMismatchError
151151
if not self._target_name == test_data.target.name:
152-
raise TargetDataMismatchError(actual_target_name=test_data.target.name, missing_target_name=self._target_name)
152+
raise TargetDataMismatchError(
153+
actual_target_name=test_data.target.name, missing_target_name=self._target_name,
154+
)
153155
test_data_as_table = test_data.to_table()
154156
if test_data_as_table.row_count == 0:
155157
raise DatasetMissesDataError

tests/safeds/ml/classical/classification/test_baseline_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from safeds.exceptions import (
44
ColumnTypeError,
55
DatasetMissesDataError,
6-
TargetDataMismatchError,
76
FeatureDataMismatchError,
87
ModelNotFittedError,
8+
TargetDataMismatchError,
99
)
1010
from safeds.ml.classical.classification import BaselineClassifier
1111

tests/safeds/ml/classical/regression/test_baseline_regressor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from safeds.exceptions import (
44
ColumnTypeError,
55
DatasetMissesDataError,
6-
TargetDataMismatchError,
76
FeatureDataMismatchError,
87
ModelNotFittedError,
8+
TargetDataMismatchError,
99
)
1010
from safeds.ml.classical.regression import BaselineRegressor
1111

0 commit comments

Comments
 (0)