Skip to content

Conversation

Rogdham
Copy link
Contributor

@Rogdham Rogdham commented Apr 7, 2023

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

Fix false positive for isinstance-second-argument-not-valid-type when union type includes None, for example:

isinstance(0, int | None)

Closes #8424

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #8549 (a7f3fba) into main (cb255ea) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8549   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files         174      174           
  Lines       18366    18366           
=======================================
  Hits        17615    17615           
  Misses        751      751           
Impacted Files Coverage Ξ”
pylint/checkers/typecheck.py 96.45% <100.00%> (ΓΈ)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit a7f3fba

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Thanks! For clean PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported 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.

isinstance-second-argument-not-valid-type false positive for union types with None
3 participants