Skip to content

Commit 78b1ebf

Browse files
committed
make typechecking test happy
1 parent a87c031 commit 78b1ebf

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class BasicSettings(BaseCustomSettings, MixinLoggingSettings):
5959

6060
# LOGGING
6161
LOG_LEVEL: LogLevel = Field(
62-
default=LogLevel.INFO.value,
62+
default=LogLevel.INFO,
6363
validation_alias=AliasChoices("API_SERVER_LOGLEVEL", "LOG_LEVEL", "LOGLEVEL"),
6464
)
6565
API_SERVER_LOG_FORMAT_LOCAL_DEV_ENABLED: bool = Field(

services/api-server/src/simcore_service_api_server/models/api_resources.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import re
22
import urllib.parse
3-
from typing import Annotated, Any, TypeAlias
3+
from typing import Annotated, TypeAlias
44

5-
from pydantic import BaseModel, Field, TypeAdapter
5+
from pydantic import Field, TypeAdapter
66
from pydantic.types import StringConstraints
77

88
# RESOURCE NAMES https://cloud.google.com/apis/design/resource_names
@@ -56,20 +56,3 @@ def compose_resource_name(*collection_or_resource_ids) -> RelativeResourceName:
5656
def split_resource_name(resource_name: RelativeResourceName) -> list[str]:
5757
quoted_parts = resource_name.split("/")
5858
return [f"{urllib.parse.unquote_plus(p)}" for p in quoted_parts]
59-
60-
61-
#
62-
# For resource definitions, the first field should be a string field for the resource name,
63-
# and it should be called *name*
64-
# Resource IDs must be clearly documented whether they are assigned by the client, the server, or either
65-
#
66-
class BaseResource(BaseModel):
67-
name: RelativeResourceName = Field(None, examples=["solvers/isolve/releases/1.2.3"])
68-
id: Any = Field(None, description="Resource ID", examples=["1.2.3"]) # noqa: A003
69-
70-
71-
class BaseCollection(BaseModel):
72-
name: RelativeResourceName = Field(None, examples=["solvers/isolve/releases"])
73-
id: Any = Field(
74-
None, description="Collection ID", examples=["releases"]
75-
) # noqa: A003

0 commit comments

Comments
 (0)