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 typelias invalid-name false positives for Union variables without assignment. #8541

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

yilei
Copy link
Contributor

@yilei yilei commented Apr 4, 2023

Those variables shouldn't be treated as TypeAlias.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Description

Closes #8540

yilei added 2 commits April 4, 2023 11:07
…ut assignment.

Those variables shouldn't be treated as TypeAlias.
@Pierre-Sassoulas Pierre-Sassoulas added False Positive 🦟 A message is emitted but nothing is wrong with the code backport maintenance/3.3.x labels Apr 4, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.3 milestone Apr 4, 2023
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.

👌

@@ -3,8 +3,8 @@

# Valid
TypeAliasShouldBeLikeThis: TypeAlias = int
_TypeAliasShouldBeLikeThis: Union[str, int]
_TypeAliasShouldBeLikeThis = Union[str, int]
Copy link
Member

Choose a reason for hiding this comment

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

Nice fix !

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 62b9a88

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!

@DanielNoord DanielNoord enabled auto-merge (squash) April 4, 2023 19:59
@yilei
Copy link
Contributor Author

yilei commented Apr 6, 2023

Looks like the coverage failure is unrelated?

@DanielNoord
Copy link
Collaborator

Yeah! Restarted it, should pass in a couple of minutes!

@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #8541 (62b9a88) into main (82cee37) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8541   +/-   ##
=======================================
  Coverage   95.90%   95.90%           
=======================================
  Files         174      174           
  Lines       18353    18353           
=======================================
  Hits        17602    17602           
  Misses        751      751           
Impacted Files Coverage Δ
pylint/checkers/base/name_checker/checker.py 98.58% <100.00%> (ø)

@DanielNoord DanielNoord merged commit cb255ea into pylint-dev:main Apr 7, 2023
github-actions bot pushed a commit that referenced this pull request Apr 7, 2023
Pierre-Sassoulas pushed a commit that referenced this pull request Apr 7, 2023
Pierre-Sassoulas pushed a commit that referenced this pull request Apr 7, 2023
…ut assignment. (#8541) (#8548)

(cherry picked from commit cb255ea)

Co-authored-by: Yilei "Dolee" Yang <[email protected]>
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.

invalid-name type alias false-positive for union variables without assignment values
3 participants