Skip to content

Commit 500239a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 44113b6 commit 500239a

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/litmodels/integrations/mixins.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def push_to_registry(
2626
"""
2727

2828
@classmethod
29-
def pull_from_registry(
30-
cls, name: str, version: Optional[str] = None, temp_folder: Optional[str] = None
31-
) -> object:
29+
def pull_from_registry(cls, name: str, version: Optional[str] = None, temp_folder: Optional[str] = None) -> object:
3230
"""Pull the model from the registry.
3331
3432
Args:
@@ -67,9 +65,7 @@ def push_to_registry(
6765
upload_model(name=name, model=pickle_path)
6866

6967
@classmethod
70-
def pull_from_registry(
71-
cls, name: str, version: Optional[str] = None, temp_folder: Optional[str] = None
72-
) -> object:
68+
def pull_from_registry(cls, name: str, version: Optional[str] = None, temp_folder: Optional[str] = None) -> object:
7369
"""Pull the model from the registry.
7470
7571
Args:

tests/integrations/test_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,4 @@ def test_picklemixin_push_and_pull():
238238
assert loaded_dummy.value == 42
239239

240240
# CLEANING
241-
_cleanup_model(teamspace, model_name, expected_num_versions=1)
241+
_cleanup_model(teamspace, model_name, expected_num_versions=1)

tests/integrations/test_mixins.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def test_pickle_push_and_pull(mock_download_model, mock_upload_model, tmp_path):
2626
# Set the mock to return the full path to the pickle file.
2727
mock_download_model.return_value = ["DummyModel.pkl"]
2828
# Call pull_from_registry and load the DummyModel instance.
29-
loaded_dummy = DummyModel.pull_from_registry(
30-
name="dummy_model", version="v1", temp_folder=str(tmp_path)
31-
)
29+
loaded_dummy = DummyModel.pull_from_registry(name="dummy_model", version="v1", temp_folder=str(tmp_path))
3230
# Verify that the unpickled instance has the expected value.
3331
assert loaded_dummy.value == 42
3432

0 commit comments

Comments
 (0)