chore: bump pydantic to 2
This commit is contained in:
parent
d56328ce4a
commit
2303cf71a2
|
@ -1,36 +1,36 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v2.3.0
|
rev: v4.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: requirements-txt-fixer
|
- id: requirements-txt-fixer
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: "v0.812"
|
rev: "v1.4.1"
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- pydantic
|
- pydantic
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.10.0
|
rev: v3.9.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
- repo: https://github.com/PyCQA/bandit
|
- repo: https://github.com/PyCQA/bandit
|
||||||
rev: '1.7.0'
|
rev: '1.7.5'
|
||||||
hooks:
|
hooks:
|
||||||
- id: bandit
|
- id: bandit
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.7.0
|
rev: 5.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
args: ["--profile", "black", "--filter-files"]
|
args: ["--profile", "black", "--filter-files"]
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.3.0
|
rev: 23.7.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
rev: v1.2.0
|
rev: v1.5.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: remove-crlf
|
- id: remove-crlf
|
||||||
- id: remove-tabs
|
- id: remove-tabs
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
from typing import List
|
||||||
|
|
||||||
from pydantic import BaseSettings
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
|
@ -29,7 +30,7 @@ class Settings(BaseSettings):
|
||||||
mattermost_suffix: str = "/mm"
|
mattermost_suffix: str = "/mm"
|
||||||
mattermost_access_token: str = ""
|
mattermost_access_token: str = ""
|
||||||
mattermost_team: str = ""
|
mattermost_team: str = ""
|
||||||
mattermost_teaching_team = [
|
mattermost_teaching_team: List[str] = [
|
||||||
"manuel",
|
"manuel",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -39,10 +40,7 @@ class Settings(BaseSettings):
|
||||||
# log file
|
# log file
|
||||||
log_file_path: str = "joint-teapot.log"
|
log_file_path: str = "joint-teapot.log"
|
||||||
stderr_log_level: str = "INFO"
|
stderr_log_level: str = "INFO"
|
||||||
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||||||
class Config:
|
|
||||||
env_file = ".env"
|
|
||||||
env_file_encoding = "utf-8"
|
|
||||||
|
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache()
|
||||||
|
|
|
@ -5,5 +5,6 @@ joj-submitter>=0.0.8
|
||||||
loguru>=0.5.3
|
loguru>=0.5.3
|
||||||
mattermostdriver>=7.3.2
|
mattermostdriver>=7.3.2
|
||||||
patool>=1.12
|
patool>=1.12
|
||||||
pydantic[dotenv]>=1.8.1
|
pydantic>=2.0.2
|
||||||
|
pydantic-settings>=2.0.1
|
||||||
typer[all]>=0.3.2
|
typer[all]>=0.3.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user