Skip to content

Commit

Permalink
Fixed not using BaseSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Nov 28, 2022
1 parent 32893e2 commit e79d85a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tbot/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, yaml
from typing import List, Optional, Literal
from pydantic import BaseModel, DirectoryPath
from pydantic import BaseModel, BaseSettings, DirectoryPath

class ConfigWebModel(BaseModel):
port = 8001
Expand Down Expand Up @@ -67,7 +67,7 @@ class ConfigRedisModel(BaseModel):
pool_min_size = 5
pool_max_size = 20

class ConfigModel(BaseModel):
class ConfigModel(BaseSettings):
debug = False
sentry_dsn: Optional[str]
web = ConfigWebModel()
Expand Down

0 comments on commit e79d85a

Please sign in to comment.