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

Not Transformed automatically for other parent class except BaseModel #166

Open
BhuwanPandey opened this issue May 9, 2024 · 0 comments

Comments

@BhuwanPandey
Copy link

BhuwanPandey commented May 9, 2024

Hy
I am using filter package fastapi-filter and when I try to migrate pydantic v1 to v2 using bump_pydantic it doesnot auto transformed.

here, the code
filters.py

from fastapi_filter.contrib.sqlalchemy import Filter

class CommentFilter(Filter):
    content_id: Optional[UUID]
    creator_id: Optional[UUID]

    class Constants(Filter.Constants):
        model = Content

when i run
python -m bum p_pydantic filters.py

It not transformed to

class CommentFilter(Filter):
    content_id: Optional[UUID] = None
    creator_id: Optional[UUID] = None

    class Constants(Filter.Constants):
        model = Content
        ```
@BhuwanPandey BhuwanPandey changed the title Auto not transformed Not Transformed automatically for other parent class except BaseModel May 15, 2024
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

No branches or pull requests

1 participant