You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a really neat extension which gives a nice output.
One thing which would be very nice to have is for any ClassVar on a model to be grouped separately or otherwise indicated in the list of attributes.
Currently it also shows pydantic-field for such a field when you set show_labels: true but this is misleading as a value set as ClassVar is not validated as part of the model!
A model example to recreate this:
classMyModelWithClassVar(BaseModel):
"""This is an example model with a `ClassVar`"""model_config=ConfigDict(extra="allow", use_enum_values=True)
TOP_SECRET: ClassVar[str] ="BASE""""This is a ClassVar"""a: int"""This is a model field"""b: str"""This is also a model field"""@field_validator("a")@classmethoddefcheck_a_is_big(cls, v: int, info: ValidationInfo) ->int:
ifv<10:
raiseValueError("a is too small!")
returnv
And this gives:
This issue was labeled with the fund label. The following section is automatically added by Polar.
This is a really neat extension which gives a nice output.
One thing which would be very nice to have is for any
ClassVar
on a model to be grouped separately or otherwise indicated in the list of attributes.Currently it also shows
pydantic-field
for such a field when you setshow_labels: true
but this is misleading as a value set asClassVar
is not validated as part of the model!A model example to recreate this:
And this gives:
![image](https://private-user-images.githubusercontent.com/24782660/399848564-15456050-9723-46ee-9093-e0d609ae4e15.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTk5NDYsIm5iZiI6MTczOTMxOTY0NiwicGF0aCI6Ii8yNDc4MjY2MC8zOTk4NDg1NjQtMTU0NTYwNTAtOTcyMy00NmVlLTkwOTMtZTBkNjA5YWU0ZTE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDAwMjA0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyYWNmZmRjZjdkYTU4Y2QzZDFiN2I3OWI4NjQ4M2JkNGM0MDVmMGM4ODM2NGYwNTNiZjljZTliYjUzMThkM2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.85xyuZh_d1xEM9rUJUUUM3e3bQGUJOu6dmb8TF9jUNk)
This issue was labeled with the
fund
label. The following section is automatically added by Polar.Boost priority in our backlog through Polar's "issue funding". Issues linked to monthly sponsorships of $50 or more (author, upvoters) are already prioritized, see how we manage our backlog.
The text was updated successfully, but these errors were encountered: