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-negative with typing.Type + typing.Callable aliases #5090

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Sep 29, 2021

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Some deprecated aliases weren't inferred correctly. The result was that deprecated-typing-alias and consider-using-alias weren't emitted. This PR adds test cases for that

from typing import Callable, Type, Tuple

var21: Type[object]
var22: Tuple[str]
var23: Callable[..., str]

Requires: pylint-dev/astroid#1192

@cdce8p cdce8p added typing False Negative πŸ¦‹ No message is emitted but something is wrong with the code Needs astroid update Needs an astroid update (probably a release too) before being mergable labels Sep 29, 2021
@cdce8p cdce8p added this to the 2.11.2 milestone Sep 29, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1317242728

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.199%

Totals Coverage Status
Change from base Build 1316812692: 0.0%
Covered Lines: 13539
Relevant Lines: 14527

πŸ’› - Coveralls

@cdce8p cdce8p merged commit 04fa427 into pylint-dev:main Oct 7, 2021
@cdce8p cdce8p deleted the bug_typing-alias branch October 7, 2021 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative πŸ¦‹ No message is emitted but something is wrong with the code Needs astroid update Needs an astroid update (probably a release too) before being mergable typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants