chore(deps): update machine-learning ()

* chore(deps): update machine-learning

* fix typing, use new lifespan syntax

* wrap in try / finally

* move log

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2024-01-13 05:00:09 +00:00 committed by GitHub
commit 20be42cec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 238 additions and 212 deletions
machine-learning/app

View file

@ -5,10 +5,10 @@ from unittest import mock
import numpy as np
import pytest
from fastapi.testclient import TestClient
from numpy.typing import NDArray
from PIL import Image
from .main import app
from .schemas import ndarray_f32
@pytest.fixture
@ -17,7 +17,7 @@ def pil_image() -> Image.Image:
@pytest.fixture
def cv_image(pil_image: Image.Image) -> ndarray_f32:
def cv_image(pil_image: Image.Image) -> NDArray[np.float32]:
return np.asarray(pil_image)[:, :, ::-1] # PIL uses RGB while cv2 uses BGR