-
Notifications
You must be signed in to change notification settings - Fork 11
Fix RUF052 errors #293
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
Fix RUF052 errors #293
Conversation
arraycontext/loopy.py
Outdated
| def sub(name: str) -> Variable | Subscript: | ||
| return Variable(name)[subscript] if subscript else Variable(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is meant to silence the deprecation in pymbolic about an empty subscript. I went with keeping the same behavior here, i.e. returning the expression itself if the subscript is empty. Let me know if it looks ok!
|
Hm, looks like the pylint bug is still not fixed :( |
The corresponding issue is not an encouraging read: pylint-dev/pylint#10112. I think I may just disable pylint in ci-support if the Python version is 3.13. |
Not great, but that sounds fine by me. They'll probably get around to fixing it soon-ish. |
|
Found a way that's a bit less of a blunt hammer: inducer/ci-support@8cf069c |
|
Thx! |
This fixes some genuine looking RUF052 errors where the function arguments just have a
_namebecause they were meant not to shadow the outer scope.