Skip to content
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

ClassDef.instance_attrs is being mutated during inference #2273

Open
jacobtylerwalls opened this issue Aug 5, 2023 · 0 comments
Open

ClassDef.instance_attrs is being mutated during inference #2273

jacobtylerwalls opened this issue Aug 5, 2023 · 0 comments

Comments

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Aug 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant