-
-
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
Crashes on metaclass=abs.olute.path.Class #3742
Comments
the same with pylint-2.6.0, python 3.8.6 |
PCManticore
added a commit
that referenced
this issue
Dec 29, 2020
PCManticore
added a commit
that referenced
this issue
Dec 29, 2020
4 tasks
PCManticore
added a commit
that referenced
this issue
Dec 29, 2020
Thanks for the report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Run pylint on this code:
class Foo(metaclass=absolute.path.MetaFoo): pass
Current behavior
Crashes with Exception:
File "/usr/lib/python3/dist-packages/pylint/checkers/variables.py", line 2020, in _check_metaclasses
consumed.extend(self._check_classdef_metaclasses(child_node, node))
File "/usr/lib/python3/dist-packages/pylint/checkers/variables.py", line 2039, in _check_classdef_metaclasses
name = klass._metaclass.expr.name
AttributeError: 'Attribute' object has no attribute 'name'
Expected behavior
Don't crash.
pylint --version output
pylint 2.5.3
astroid 2.4.2
Python 3.8.5 (default, Jul 20 2020, 18:32:44)
[GCC 9.3.0]
Thx for looking into this.
S
The text was updated successfully, but these errors were encountered: