Skip to content

Commit f070a07

Browse files
author
Andrei Neagu
committed
pylint
1 parent 2294bfe commit f070a07

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

packages/pytest-simcore/src/pytest_simcore/helpers/httpx_calls_capture_parameters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from typing import Literal
1+
from typing import Annotated, Literal
22

3-
from pydantic import field_validator, model_validator, ConfigDict, BaseModel, Field
3+
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
44

55
from .httpx_calls_capture_errors import OpenApiSpecError
66

@@ -94,7 +94,7 @@ class CapturedParameter(BaseModel):
9494
in_: Literal["path", "header", "query"] = Field(..., alias="in")
9595
name: str
9696
required: bool
97-
schema_: CapturedParameterSchema = Field(..., alias="schema")
97+
schema_: Annotated[CapturedParameterSchema, Field(..., alias="schema")]
9898
response_value: str | None = (
9999
None # attribute for storing the params value in a concrete response
100100
)

services/api-server/src/simcore_service_api_server/core/settings.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from functools import cached_property
2+
from typing import Annotated
23

34
from models_library.basic_types import BootModeEnum, LogLevel
45
from pydantic import (
@@ -87,9 +88,10 @@ class ApplicationSettings(BasicSettings):
8788
# DOCKER BOOT
8889
SC_BOOT_MODE: BootModeEnum | None = None
8990

90-
API_SERVER_POSTGRES: PostgresSettings | None = Field(
91-
json_schema_extra={"auto_default_from_env": True}
92-
)
91+
API_SERVER_POSTGRES: Annotated[
92+
PostgresSettings | None,
93+
Field(json_schema_extra={"auto_default_from_env": True}),
94+
]
9395

9496
API_SERVER_RABBITMQ: RabbitSettings | None = Field(
9597
json_schema_extra={"auto_default_from_env": True},

services/api-server/src/simcore_service_api_server/models/schemas/solvers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
class Solver(BaseModel):
3939
"""A released solver with a specific version"""
4040

41-
id: SolverKeyId = Field(..., description="Solver identifier") # noqa: A003
41+
id: SolverKeyId = Field(..., description="Solver identifier")
4242
version: VersionStr = Field(
4343
...,
4444
description="semantic version number of the node",
@@ -52,7 +52,7 @@ class Solver(BaseModel):
5252
# TODO: consider version_aliases: list[str] = [] # remaining tags
5353

5454
# Get links to other resources
55-
url: HttpUrl | None = Field(..., description="Link to get this resource")
55+
url: Annotated[HttpUrl | None, Field(..., description="Link to get this resource")]
5656
model_config = ConfigDict(
5757
extra="ignore",
5858
json_schema_extra={

0 commit comments

Comments
 (0)