Skip to content

AttributeError: 'TypeVarTuple' object has no attribute 'qname' #11057

@correctmost

Description

@correctmost

Bug description

# Code from a local fuzzing run

type T[*P] = None

class C(P):
    pass

Configuration

Command used

pylint crash.py

Pylint output

Traceback (most recent call last):
  File "pylint/pylint/utils/ast_walker.py", line 87, in walk
    callback(astroid)
    ~~~~~~~~^^^^^^^^^
  File "pylint/pylint/checkers/classes/class_checker.py", line 880, in visit_classdef
    self._check_bases_classes(node)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "pylint/pylint/checkers/classes/class_checker.py", line 2194, in _check_bases_classes
    if class_is_abstract(node):
       ~~~~~~~~~~~~~~~~~^^^^^^
  File "pylint/pylint/checkers/utils.py", line 1168, in class_is_abstract
    if is_protocol_class(node):
       ~~~~~~~~~~~~~~~~~^^^^^^
  File "pylint/pylint/checkers/utils.py", line 1692, in is_protocol_class
    if inf_base.qname() in TYPING_PROTOCOLS:
       ^^^^^^^^^^^^^^
AttributeError: 'TypeVarTuple' object has no attribute 'qname'. Did you mean: 'name'?

Expected behavior

No crash

Pylint version

pylint-dev/pylint@880b90d4a
pylint-dev/astroid@1f3b8fad1f
Python 3.14.5

OS / Environment

Arch Linux

Additional dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    Crash 💥A bug that makes pylint crashNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions