mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-30 07:40:12 +03:00
fix(typing): resolve mypy errors in schemas.controller.settings
This commit is contained in:
parent
01dd09495c
commit
07dc9b4d7d
@ -25,6 +25,7 @@ says, so exposing or writing it via the API would be useless at best and
|
||||
a secret leak at worst.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import ConfigDict, BaseModel, Field
|
||||
@ -49,9 +50,11 @@ SECRET_MASK = "**********"
|
||||
class ServerSettingsResponse(ServerSettings):
|
||||
# plain strings instead of FilePath/DirectoryPath: paths are validated when
|
||||
# the settings are loaded or updated, not when echoed back to the client
|
||||
secrets_dir: Optional[str] = Field(None, description="Directory where secrets are stored (e.g. the JWT secret key)")
|
||||
certfile: Optional[str] = Field(None, description="SSL certificate file, requires enable_ssl")
|
||||
certkey: Optional[str] = Field(None, description="SSL key file, requires enable_ssl")
|
||||
secrets_dir: Optional[Path] = Field(
|
||||
None, description="Directory where secrets are stored (e.g. the JWT secret key)"
|
||||
)
|
||||
certfile: Optional[Path] = Field(None, description="SSL certificate file, requires enable_ssl")
|
||||
certkey: Optional[Path] = Field(None, description="SSL key file, requires enable_ssl")
|
||||
# Optional overrides: typed as plain "str = None" in the config schema,
|
||||
# which fails re-validation when the value actually is None
|
||||
resources_path: Optional[str] = Field(
|
||||
|
||||
@ -384,7 +384,6 @@ module = [
|
||||
"gns3server.schemas.compute.qemu_nodes", # 1
|
||||
"gns3server.schemas.compute.virtualbox_nodes", # 2
|
||||
"gns3server.schemas.controller.computes", # 6
|
||||
"gns3server.schemas.controller.settings", # 3
|
||||
"gns3server.schemas.controller.templates.docker_templates", # 1
|
||||
"gns3server.schemas.controller.templates.iou_templates", # 1
|
||||
"gns3server.schemas.controller.templates.virtualbox_templates", # 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user