Check for reserved keywords #12405
clytaemnestra
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! We've been using Ruff for formatting and it's a fantastic tool. Recently, I encountered a situation and wanted to ask if there are any plans to address it.
When declaring data classes, it's possible to use reserved keywords for parameters. For example:
In the past, I've encountered cases where using reserved keywords caused issues, with IDEs or interpreters confusing them with built-in functions like type(). I checked best practices and I found this answer that says that the best practice is to avoid reserved keywords as arguments.
I checked Ruff's documentation but couldn't find anything related to this issue. It's also not covered by mypy. Are there any plans to implement a feature that flags the use of reserved keywords in this context?
Beta Was this translation helpful? Give feedback.
All reactions