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
"Config" overrides symbol of same name in class "BaseSettings" #4223
Comments
@adithep Pylance is correct here. You have to explicitly subclass the import pydantic
class Settings(pydantic.BaseSettings):
class Config(pydantic.BaseSettings.Config):
env_file = '.env'
env_file_encoding = 'utf-8' |
Should this maybe be changed in the docs as well? The example given here still causes an error in type checkers. |
Output of
For what it's worth, running
causes
for the assignment I am running mypy version: [tool.mypy]
plugins = [
"pydantic.mypy"
] Granted, the docs say that this plugin only works with CC: @RobertCraigie |
|
Thank you! This is great. However, I am still seeing |
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:I get error:
The text was updated successfully, but these errors were encountered: