mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-14 21:49:42 +03:00
Use pydantic instead of dataclasses
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from ..config import Config
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from ..config import GlobalConfig as Config
|
||||
|
||||
|
||||
class ApiMethod:
|
||||
api_url: str
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.api_url = Config().api_url
|
||||
class ApiMethod(BaseModel):
|
||||
api_url: str = Field(Config().api_url)
|
||||
|
||||
Reference in New Issue
Block a user