Skip to content

Inference crash: Slice has no attribute 'qname' #8067

@tushar-deepsource

Description

@tushar-deepsource

Bug description

x = slice(42)
x()

Configuration

No response

Command used

pylint asd.py

Pylint output

************* Module asd
asd.py:1:0: C0114: Missing module docstring (missing-module-docstring)
Exception on node <Call l.2 at 0x1040c31f0> in file '/private/tmp/asd.py'
Traceback (most recent call last):
  File "/private/tmp/venv3/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 90, in walk
    callback(astroid)
  File "/private/tmp/venv3/lib/python3.10/site-packages/pylint/checkers/method_args.py", line 72, in visit_call
    and inferred.qname() in self.linter.config.timeout_methods
AttributeError: 'Slice' object has no attribute 'qname'
asd.py:1:0: F0002: asd.py: Fatal error while checking 'asd.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/Users/tusharsadhwani/Library/Caches/pylint/pylint-crash-2023-01-17-14-57-43.txt'. (astroid-error)

Expected behavior

No crash.

Pylint version

pylint 2.15.10
astroid 2.13.2
Python 3.10.6 (main, Aug 30 2022, 04:58:14) [Clang 13.1.6 (clang-1316.0.21.2.5)]

OS / Environment

MacOS Monterey

Additional dependencies

No response

Metadata

Metadata

Labels

Blocker 🙅Blocks the next releaseCrash 💥A bug that makes pylint crashqnameIssue related to qname

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions