Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
chore(config): edit desc,...
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Jan 15, 2025
1 parent 338838a commit 741ecdf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/check_phat_nguoi/config/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Config(BaseModel):
)
api: tuple[ApiEnum, ...] | ApiEnum = Field(
title="API",
description="Sử dụng API từ trang web nào. Mặc định sẽ là list các API và dừng khi 1 API lấy dữ liệu thành công. Có thể điền giá trị trùng để retry. Hoặc chỉ dùng 1 API. Hiện tại API từ cgst.vn không đảm bảo có thể chạy.",
description="Sử dụng API từ trang web nào. Mặc định sẽ là list các API như trong schema hiển thị và dừng khi 1 API lấy dữ liệu thành công. Có thể điền giá trị trùng để retry. Hoặc chỉ dùng 1 API",
default=(ApiEnum.phatnguoi_vn, ApiEnum.checkphatnguoi_vn),
min_length=1,
)
Expand All @@ -47,9 +47,9 @@ class Config(BaseModel):
description="Chỉ lọc các thông tin vi phạm chưa nộp phạt",
default=True,
)
detail: bool = Field(
title="Hiển thị đầy đủ thông tin",
description="Hiển thị tất cả thông tin có thể hiển thị",
show_less_details: bool = Field(
title="Hiển thị ít thông tin",
description="Chỉ hiển thị những thông tin biển vi phạm cần thiết",
default=False,
)
request_timeout: int = Field(
Expand All @@ -64,7 +64,7 @@ class Config(BaseModel):
)
detail_log: bool = Field(
title="Log chi tiết",
description="Log chi tiết",
description="Log nhiều thông tin chi tiết hơn",
default=False,
)
log_level: LogLevelEnum = Field(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import ConfigDict, Field
from pydantic import ConfigDict

from .base_notification import BaseNotificationConfig
from .discord_engine import DiscordNotificationEngineConfig
Expand All @@ -10,9 +10,7 @@ class DiscordNotificationConfig(BaseNotificationConfig):
frozen=True,
)

discord: DiscordNotificationEngineConfig = Field(
description="Discord",
)
discord: DiscordNotificationEngineConfig


__all__ = ["DiscordNotificationConfig"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import ConfigDict, Field
from pydantic import ConfigDict

from .base_notification import BaseNotificationConfig
from .telegram_engine import TelegramNotificationEngineConfig
Expand All @@ -10,9 +10,7 @@ class TelegramNotificationConfig(BaseNotificationConfig):
frozen=True,
)

telegram: TelegramNotificationEngineConfig = Field(
description="Telegram",
)
telegram: TelegramNotificationEngineConfig


__all__ = ["TelegramNotificationConfig"]
2 changes: 1 addition & 1 deletion src/check_phat_nguoi/config/models/plate_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class PlateInfo(BaseModel):
model_config = ConfigDict(
title="Thông tin thiết lập cho biển số",
title="Thông tin biển số",
frozen=True,
)

Expand Down

0 comments on commit 741ecdf

Please sign in to comment.