Skip to content

ClassDef.instance_attrs is being mutated during inference #2273

Open
@jacobtylerwalls

Description

@jacobtylerwalls

Steps to reproduce

  1. Clone music21 (from pylint primer)
  2. Revert the pylint change from pylint-dev/pylint@81be03b
  3. Compare:
  • pylint music21.roman --disable=all --enable=too-many-instance-attributes
  • pylint music21 --disable=all --enable=too-many-instance-attributes

Current behavior

The second form gives a too-many-instance-attributes message because it finds 5 extra instance attributes from a parent class using properties.

Expected behavior

no message

python -c "from astroid import __pkginfo__; print(__pkginfo__.version)" output

pylint 3.0.0b1
astroid 3.0.0a9-dev0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions