ruff
[red-knot] Type narrowing for `isinstance` checks
#13894
Merged

[red-knot] Type narrowing for `isinstance` checks #13894

sharkdp merged 13 commits into main from david/isinstance-narrowing
sharkdp
sharkdp sharkdp added ty
github-actions
sharkdp sharkdp marked this pull request as ready for review 1 year ago
sharkdp sharkdp requested a review from carljm carljm 1 year ago
sharkdp sharkdp requested a review from MichaReiser MichaReiser 1 year ago
sharkdp sharkdp requested a review from AlexWaygood AlexWaygood 1 year ago
sharkdp
sharkdp commented on 2024-10-23
sharkdp [red-knot] Type narrowing for isinstance checks
6c2b513e
sharkdp sharkdp force pushed from a3c2af75 to 6c2b513e 1 year ago
AlexWaygood
AlexWaygood commented on 2024-10-23
sharkdp Add additional test
bd592017
AlexWaygood
AlexWaygood commented on 2024-10-23
sharkdp Make sure we only narrow for builtins.isinstance
61048a0d
sharkdp Collapse match patterns
5bd555fe
sharkdp Add test for isinstance aliasing
d4f28715
sharkdp Add test for builtins.type instances
78107f72
sharkdp Add test for imported isinstance
707e4630
sharkdp Make sure that kwargs are empty
eadcaa22
AlexWaygood
AlexWaygood commented on 2024-10-23
carljm
carljm approved these changes on 2024-10-23
AlexWaygood
AlexWaygood commented on 2024-10-23
sharkdp Add TODO comment regarding diagnostic for kwargs
9e5e9063
sharkdp Add check for inferred type of t: type
6eabdc17
sharkdp Add FunctionType::is_known
5cf0efde
sharkdp generate_isinstance_constraint as free function
8a469077
AlexWaygood
AlexWaygood approved these changes on 2024-10-23
sharkdp Add test if second argument is not a type
25bcc43e
sharkdp sharkdp force pushed from 86f37ad2 to 25bcc43e 1 year ago
carljm
carljm approved these changes on 2024-10-23
sharkdp sharkdp merged 2c57c2dc into main 1 year ago
sharkdp sharkdp deleted the david/isinstance-narrowing branch 1 year ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone