mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 22:43:26 +00:00
Форматирование кода
This commit is contained in:
parent
82db9c0e6f
commit
f1e563927e
|
@ -3,8 +3,6 @@ import logging.config as logging_config
|
||||||
|
|
||||||
import fastapi
|
import fastapi
|
||||||
|
|
||||||
import lib.api.v1.handlers as api_handlers
|
|
||||||
|
|
||||||
from .logger import LOGGING
|
from .logger import LOGGING
|
||||||
from .settings import get_settings
|
from .settings import get_settings
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
|
import pydantic
|
||||||
import pydantic_settings
|
import pydantic_settings
|
||||||
from pydantic import Field, field_validator
|
|
||||||
|
|
||||||
|
|
||||||
class DbSettings(pydantic_settings.BaseSettings):
|
class DbSettings(pydantic_settings.BaseSettings):
|
||||||
|
@ -23,12 +23,12 @@ class ApiSettings(pydantic_settings.BaseSettings):
|
||||||
|
|
||||||
class Settings(pydantic_settings.BaseSettings):
|
class Settings(pydantic_settings.BaseSettings):
|
||||||
debug: str = "false"
|
debug: str = "false"
|
||||||
db: DbSettings = Field(default_factory=DbSettings)
|
db: DbSettings = pydantic.Field(default_factory=lambda: DbSettings())
|
||||||
api: ApiSettings = Field(default_factory=ApiSettings)
|
api: ApiSettings = pydantic.Field(default_factory=lambda: ApiSettings())
|
||||||
|
|
||||||
jwt_secret_key: str
|
jwt_secret_key: str = pydantic.Field(default=...)
|
||||||
|
|
||||||
@field_validator("debug")
|
@pydantic.field_validator("debug")
|
||||||
@classmethod
|
@classmethod
|
||||||
def validate_debug(cls, v: str) -> bool:
|
def validate_debug(cls, v: str) -> bool:
|
||||||
return v.lower() == "true"
|
return v.lower() == "true"
|
||||||
|
|
4
src/fastapi_app/poetry.lock
generated
4
src/fastapi_app/poetry.lock
generated
|
@ -1,4 +1,4 @@
|
||||||
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
|
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "alembic"
|
name = "alembic"
|
||||||
|
@ -1092,7 +1092,7 @@ files = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
greenlet = {version = "!=0.4.17", markers = "platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\""}
|
greenlet = {version = "!=0.4.17", markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\""}
|
||||||
typing-extensions = ">=4.2.0"
|
typing-extensions = ">=4.2.0"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user