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

Allow pydantic.BaseSettings anywhere we allow pydantic.BaseModel #5308

Closed
charliermarsh opened this issue Jun 22, 2023 · 0 comments · Fixed by #5312
Closed

Allow pydantic.BaseSettings anywhere we allow pydantic.BaseModel #5308

charliermarsh opened this issue Jun 22, 2023 · 0 comments · Fixed by #5312
Assignees
Labels
bug Something isn't working

Comments

@charliermarsh
Copy link
Member

No description provided.

@charliermarsh charliermarsh added the bug Something isn't working label Jun 22, 2023
@charliermarsh charliermarsh self-assigned this Jun 22, 2023
charliermarsh pushed a commit that referenced this issue Nov 20, 2023
#8793)

## Summary

In 2.0, Pydantic has moved the `BaseSettings` class to a separate
package called `pydantic-settings`
(https://docs.pydantic.dev/2.4/migration/#basesettings-has-moved-to-pydantic-settings),
which results in a false positive on `RUF012` (`mutable-class-default`).
A simple fix for that would be adding `pydantic_settings.BaseSettings`
base to the `has_default_copy_semantics` helper, which I've done in this
PR.

Related issue: #5308

## Test Plan

`cargo test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant