Skip to content

Fix false positive for invalid-class-object when inference fails #5901

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

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Fix a false positive for invalid-class-object when the object being assigned is not inferable. (None is one of the ambiguous cases returned by safe_infer().)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1971919168

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.032%

Totals Coverage Status
Change from base Build 1969334727: 0.0%
Covered Lines: 15030
Relevant Lines: 15984

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Mar 12, 2022
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.

LGTM !

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Mar 12, 2022
@DanielNoord DanielNoord mentioned this pull request Mar 12, 2022
2 tasks
@Pierre-Sassoulas Pierre-Sassoulas merged commit 49a2e19 into pylint-dev:main Mar 12, 2022
@jacobtylerwalls jacobtylerwalls deleted the invalid-class-object-uninferable branch March 12, 2022 18:23
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.

3 participants