Skip to content

Commit 5d88be9

Browse files
committed
fixes mypy
1 parent b690189 commit 5d88be9

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

services/api-server/tests/unit/_with_db/test_api_user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import respx
1111
from fastapi import FastAPI
1212
from models_library.api_schemas_webserver.users import MyProfileGet as WebProfileGet
13+
from pytest_mock import MockType
1314
from respx import MockRouter
1415
from simcore_service_api_server._meta import API_VTAG
1516
from simcore_service_api_server.core.settings import ApplicationSettings

services/api-server/tests/unit/api_solvers/test_api_routers_solvers_jobs_delete.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from faker import Faker
1313
from models_library.basic_regex import UUID_RE_BASE
1414
from pydantic import TypeAdapter
15+
from pytest_mock import MockType
1516
from pytest_simcore.helpers.httpx_calls_capture_models import HttpApiCallCaptureModel
1617
from respx import MockRouter
1718
from servicelib.common_headers import (

services/api-server/tests/unit/api_solvers/test_api_routers_solvers_jobs_metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from faker import Faker
1212
from models_library.basic_regex import UUID_RE_BASE
1313
from pydantic import TypeAdapter
14+
from pytest_mock import MockType
1415
from pytest_simcore.helpers.httpx_calls_capture_models import HttpApiCallCaptureModel
1516
from respx import MockRouter
1617
from simcore_service_api_server._meta import API_VTAG

services/web/server/src/simcore_service_webserver/projects/_jobs_repository.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22

33
from models_library.projects import ProjectID
4+
from pydantic import PositiveInt
45
from simcore_postgres_database.models.projects_to_jobs import projects_to_jobs
56
from simcore_postgres_database.utils_repos import transaction_context
67
from sqlalchemy.dialects.postgresql import insert as pg_insert
@@ -19,7 +20,7 @@ async def set_project_as_job(
1920
*,
2021
project_uuid: ProjectID,
2122
job_parent_resource_name: str,
22-
) -> int:
23+
) -> PositiveInt:
2324
async with transaction_context(self.engine, connection) as conn:
2425
stmt = (
2526
pg_insert(projects_to_jobs)
@@ -36,4 +37,5 @@ async def set_project_as_job(
3637

3738
result = await conn.execute(stmt)
3839
row = result.one()
39-
return row.id
40+
projects_to_jobs_id: PositiveInt = row.int
41+
return projects_to_jobs_id

0 commit comments

Comments
 (0)