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

Avoid using Any in BaseSettings signature to avoid mypy errors #529

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Jan 24, 2025

When --disallow-any-explicit, this raises a mypy error when using the plugin (which synthesizes the __init__ method).

Also use PEP 570 positional only argument for self.

Fixes pydantic/pydantic#11313.

When `--disallow-any-explicit`, this raises a mypy error
when using the plugin (which synthesizes the `__init__` method).

Also use PEP 570 positional only argument for `self`.
@Viicos Viicos requested a review from sydney-runkle January 24, 2025 10:44
@hramezani
Copy link
Member

Thanks @Viicos

@hramezani hramezani merged commit 537f751 into main Feb 19, 2025
21 checks passed
@hramezani hramezani deleted the any-mypy branch February 19, 2025 08:25
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.

mypy "Explicit "Any" is not allowed" error when extending "BaseSettings"
2 participants