-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Crash: AstroidError in refactoring_checker.py #8207
Comments
@belm0 - do you know what line (in the code Pylint checked) caused the crash? or any way to reproduce your error? |
I was hoping it would be enough to imagine how the following might happen in the pylint code. If not, I'll try to whittle down the input.
|
Could you provide the value of the |
Ah, that's exactly the code I've narrowed in on. Try this: class Foo:
def bar(self):
return {
(x, x): value
for x, row in enumerate([(5, 10), (20, 30)])
for y, value in enumerate(row, -self.unknown)} In the original code, the attribute is defined, and it is an |
the problem seems to be the unary minus class Foo:
def __init__(self):
self.offset = -10
def bar(self):
return {
(x, x): value
for x, row in enumerate([(5, 10), (20, 30)])
for y, value in enumerate(row, -self.offset)} |
Thank you @belm0 amazing 👍 |
Bug description
proprietary code, I haven't tried to narrow it down
pylint crashed with
AstroidError
and with the following stacktrace:Configuration
No response
Command used
Pylint output
Expected behavior
n/a
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: