Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: compatible with pydantic v1 #180

Merged
merged 12 commits into from
Jan 10, 2024
Merged

feat: compatible with pydantic v1 #180

merged 12 commits into from
Jan 10, 2024

Conversation

Dobiichi-Origami
Copy link
Collaborator

Copy link
Collaborator

@danielhjz danielhjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

others LGTM

@@ -72,7 +73,7 @@ preview = true
[tool.mypy]
ignore_missing_imports = "True"
disallow_untyped_defs = "True"
exclude = ["qianfan/tests"]
exclude = ["qianfan/tests", "qianfan/pydantic"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是避免什么问题

"""

try:
from pydantic.v1 import * # noqa
Copy link
Collaborator

@danielhjz danielhjz Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用v1 api

class Config:
env_file_encoding = "utf-8"
env_prefix = "QIANFAN_"
case_sensitive = True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BaseSettings内部类Config用于设置BaseSetting的一些元信息和行为选项

@danielhjz danielhjz merged commit 32a89b3 into main Jan 10, 2024
15 checks passed
@danielhjz danielhjz deleted the dynaconf branch January 10, 2024 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants