QTZPOC-20

QTZPOC-20: Apply minor formatting adjustments to improve code readability.
This commit is contained in:
2026-09-10 09:23:31 -03:00
parent 4c7cae502f
commit 7c45dbb407
3 changed files with 12 additions and 4 deletions

View File

@@ -444,7 +444,9 @@ class ImportModel:
retry_policy=retry_policy, retry_policy=retry_policy,
start_to_close_timeout=CLEANUP_TIMEOUT, start_to_close_timeout=CLEANUP_TIMEOUT,
) )
except BaseException as error: # NOSONAR - cleanup never replaces the failure that brought us here except (
BaseException
) as error: # NOSONAR - cleanup never replaces the failure that brought us here
if is_cancelled_exception(error): if is_cancelled_exception(error):
raise raise
return {'cleaned': False} return {'cleaned': False}

View File

@@ -463,7 +463,9 @@ def test_extract_member_rechecks_containment_on_the_resolved_path(work_dir, read
assert error.value.gate == 5 assert error.value.gate == 5
def test_extract_member_rejects_a_stream_larger_than_its_declared_size(work_dir, reader, monkeypatch): def test_extract_member_rejects_a_stream_larger_than_its_declared_size(
work_dir, reader, monkeypatch
):
"""A decompressed stream longer than the entry's declared `file_size` is rejected mid-write, """A decompressed stream longer than the entry's declared `file_size` is rejected mid-write,
instead of trusting the central-directory metadata gate 4 already checked in aggregate. instead of trusting the central-directory metadata gate 4 already checked in aggregate.

View File

@@ -667,7 +667,9 @@ async def test_download_model_resolves_run_id_once_non_wrapper(mlflow_repository
await mlflow_repository.download_model('test_model', {}, 'predict', 'sklearn', False) await mlflow_repository.download_model('test_model', {}, 'predict', 'sklearn', False)
mlflow_repository.get_model_run_id.assert_called_once_with(model_name='test_model', stage='Production') mlflow_repository.get_model_run_id.assert_called_once_with(
model_name='test_model', stage='Production'
)
mlflow_repository.download_artifact_code_dir.assert_called_once_with( mlflow_repository.download_artifact_code_dir.assert_called_once_with(
'test_model', 'prediction_model', 'sklearn', {}, run_id='run-123' 'test_model', 'prediction_model', 'sklearn', {}, run_id='run-123'
) )
@@ -685,7 +687,9 @@ async def test_download_model_resolves_run_id_once_wrapper(mlflow, mlflow_reposi
await mlflow_repository.download_model('test_model', {}, 'predict', 'pyfunc', True) await mlflow_repository.download_model('test_model', {}, 'predict', 'pyfunc', True)
mlflow_repository.get_model_run_id.assert_called_once_with(model_name='test_model', stage='Production') mlflow_repository.get_model_run_id.assert_called_once_with(
model_name='test_model', stage='Production'
)
mlflow_repository.download_artifact_code_dir.assert_called_once_with( mlflow_repository.download_artifact_code_dir.assert_called_once_with(
'test_model', 'prediction_model', 'pyfunc', {}, run_id='run-123' 'test_model', 'prediction_model', 'pyfunc', {}, run_id='run-123'
) )