We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Can't use pydantic class fields in code only aliases
To Reproduce
from pydantic import BaseModel, Field, ConfigDict from typing import Tuple class CustomBaseModel(BaseModel): model_config = ConfigDict( populate_by_name=True, arbitrary_types_allowed=True ) class Range(CustomBaseModel): min_: int | float = Field(alias='Min') max_: int | float = Field(alias='Max') def format_to_tuple(self) -> Tuple[int | float, int | float]: return self.min_, self.max_ p = Range(min_=0, max_=5)
Expected behavior I expected I can write p = Range(min_=0, max=5) without IDE warnings
p = Range(min_=0, max=5)
Screenshots
Environments (please complete the following information):
The text was updated successfully, but these errors were encountered:
When I have encountered this, inside the plugin's getFieldName function:
pydanticVersion
null
config
Sorry, something went wrong.
same here. happens also in version 2024.2.2
No branches or pull requests
Describe the bug
Can't use pydantic class fields in code only aliases
To Reproduce
Expected behavior
I expected I can write
p = Range(min_=0, max=5)
without IDE warningsScreenshots
Environments (please complete the following information):
The text was updated successfully, but these errors were encountered: