Skip to content

Commit 5894a8d

Browse files
committed
Fix lint issues
1 parent 8ae3269 commit 5894a8d

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/datacustomcode/einstein_predictions/spark_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
Optional,
2323
)
2424

25-
from datacustomcode.einstein_predictions.types import PredictionType
2625
from datacustomcode.mixin import UserExtendableNamedConfigMixin
2726

2827
if TYPE_CHECKING:
2928
from pyspark.sql import Column
3029

30+
from datacustomcode.einstein_predictions.types import PredictionType
31+
3132

3233
class SparkEinsteinPredictions(ABC, UserExtendableNamedConfigMixin):
3334
CONFIG_NAME: str

src/datacustomcode/einstein_predictions/spark_default.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ def _build_request(
159159
settings: Optional[Dict[str, Any]],
160160
) -> PredictionRequest:
161161
prediction_columns = [
162-
_feature_to_prediction_column(name, value)
163-
for name, value in features.items()
162+
_feature_to_prediction_column(name, value) for name, value in features.items()
164163
]
165164
return PredictionRequest(
166165
prediction_type=prediction_type,

tests/test_spark_einstein_predictions.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
_invoke_predictions,
1818
_invoke_predictions_as_struct,
1919
)
20-
from datacustomcode.einstein_predictions.types import (
21-
PredictionResponse,
22-
PredictionType,
23-
)
20+
from datacustomcode.einstein_predictions.types import PredictionResponse, PredictionType
2421

2522

2623
def _success_response(data: dict | None = None) -> PredictionResponse:
@@ -76,7 +73,7 @@ def test_returns_object_from_config(self):
7673
)
7774

7875
assert _build_underlying_predictions() is mock_predictions
79-
mock_obj_config.einstein_predictions_config.to_object.assert_called_once_with() # noqa: E501
76+
mock_obj_config.einstein_predictions_config.to_object.assert_called_once_with()
8077

8178
def test_raises_when_config_missing(self):
8279
with patch(

0 commit comments

Comments
 (0)