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

Fix false positive unused-private-member if class member is assigned/mutated with cls #4663

Merged
merged 1 commit into from Jul 4, 2021

Conversation

yushao2
Copy link
Collaborator

@yushao2 yushao2 commented Jul 3, 2021

Handle case where private class attributes are assigned/mutated with: cls.attrib = ...

This was forgotten during the initial implementation.

Steps

  • Add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #4657

@yushao2 yushao2 added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jul 3, 2021
@yushao2 yushao2 added this to the 2.9.4 milestone Jul 3, 2021
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.04% when pulling f324d09 on yushao2:fix-unused-private-member into 6f06673 on PyCQA:main.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this small change with lot of tests and the documentation that goes with it ;)

@yushao2 yushao2 merged commit c026826 into pylint-dev:main Jul 4, 2021
@yushao2 yushao2 deleted the fix-unused-private-member branch July 4, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive unused-private-member if class member is mutated via cls
3 participants