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

builtin-argument-shadowing (A002) should not fire when overriding #12412

Closed
tylerlaprade opened this issue Jul 19, 2024 · 0 comments · Fixed by #12415
Closed

builtin-argument-shadowing (A002) should not fire when overriding #12412

tylerlaprade opened this issue Jul 19, 2024 · 0 comments · Fixed by #12415
Assignees
Labels
bug Something isn't working

Comments

@tylerlaprade
Copy link
Contributor

I have a custom API request factory that inherits from Django Rest Framework's APIRequestFactory. I am overriding the post() and patch() methods with some custom behavior. I need to use the same parameters as the overridden method, including one named format. Since format is a Python built-in, A002 is triggered, but I have no recourse to rename it. For now, I'm excluding "format" in builtin-ignores, but I'd prefer to keep triggering on format in any non-overridden method.

By the way, I'm on Python 3.12 and using @override on all my override methods, so it should be easy to determine if a method is an override that way.

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.

2 participants