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

[Enhancement]: extending FURB120for defaulted Pydantic BaseModel args #344

Open
jamesbraza opened this issue Jun 27, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jamesbraza
Copy link

Overview

With Refurb v2 and Pydantic v2, FURB120 does not apply to Pydantic fields:

from pydantic import BaseModel


def foo(arg: int = 1) -> None:
    pass


class Bar(BaseModel):
    arg: int = 1


foo(arg=1)  # Refurb throws FURB120
Bar(arg=1)  # Refurb does not throw FURB120

Proposal

It would be cool if FURB120 applied to Pydantic BaseModel fields

@jamesbraza jamesbraza added the enhancement New feature or request label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant