Skip to content

Commit

Permalink
🚨 Fixed flake8 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adjorn committed Dec 19, 2024
1 parent 5e534c2 commit 8f4dbf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions sam/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
from sam.preprocessing import inverse_differenced_target, make_shifted_target
from sam.utils import assert_contains_nans, make_df_monotonic
from sklearn.base import BaseEstimator, RegressorMixin, TransformerMixin
from sklearn.compose import ColumnTransformer
from sklearn.utils.validation import check_is_fitted
from sklearn.pipeline import Pipeline

from sam.utils.json_helpers import object_to_dict, object_from_dict

Expand Down Expand Up @@ -688,7 +686,7 @@ def dump(
backup = None
if hasattr(self, "model_"):
check_is_fitted(self, "model_")
# Dirty but we need to get the default file extension of the inheritor when file_extension is None
# Dirty but we need to get the default file extension of the inheritor
dump_kwargs = (
{}
if weights_file_extension is None
Expand Down
3 changes: 2 additions & 1 deletion sam/models/constant_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ def dump_parameters(
cloudpickle.dump(self.model_, f)
case _:
raise ValueError(
f"The file extension: {file_extension} is not supported choose '.pkl' or '.json'"
f"The file extension: {file_extension} "
f"is not supported choose '.pkl' or '.json'"
)

@staticmethod
Expand Down
3 changes: 2 additions & 1 deletion sam/models/mlp_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ def dump_parameters(

case _:
raise ValueError(
f"The file extension: {file_extension} is not supported choose '.pkl' or '.json'"
f"The file extension: {file_extension} "
f"is not supported choose '.pkl' or '.json'"
)

@staticmethod
Expand Down

0 comments on commit 8f4dbf2

Please sign in to comment.