-
-
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 using isinstance
+ super
due to Astroid
#8554
Labels
Crash 💥
A bug that makes pylint crash
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
Milestone
Comments
Pierre-Sassoulas
added
Crash 💥
A bug that makes pylint crash
Needs investigation 🔬
A bug or crash where it's not immediately obvious what is happenning
labels
Apr 15, 2023
jacobtylerwalls
added
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
and removed
Needs investigation 🔬
A bug or crash where it's not immediately obvious what is happenning
labels
May 13, 2023
Also necessary to reproduce is the argument-less call to >>> super()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: super(): no arguments |
jacobtylerwalls
added a commit
to jacobtylerwalls/pylint
that referenced
this issue
May 13, 2023
@jacobtylerwalls I think this issue is broader in scope than just when there is an argument-less call. For example, this causes a crash as well: class B:
pass
class A(B):
def __init__(self):
if not isinstance(super(B, self), float):
pass |
Good news is that this case is fixed as well. I'll update the changelog entry, thanks. 👍 |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
May 21, 2023
Handle objects.Super in helpers.object_type(). Refs pylint-dev/pylint#8554
Pierre-Sassoulas
added a commit
that referenced
this issue
Jun 7, 2023
Pierre-Sassoulas
pushed a commit
that referenced
this issue
Jun 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Crash 💥
A bug that makes pylint crash
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
Bug description
When parsing the following
a.py
:there is a crash. Note however that this snippet is fine:
with
not
removed. Also I believe it's nothing to do withfloat
: you can replace this with a custom class, or another built-in.Command used
Pylint output
pylint crashed with a ``AstroidError`` and with the following stacktrace:
Expected behaviour
No crash.
Pylint version
OS / Environment
linux (Linux)
The text was updated successfully, but these errors were encountered: