8000 Fix crash when a star expression is used in isinstance by onlined · Pull Request #6659 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Fix crash when a star expression is used in isinstance #6659

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

Merged
merged 6 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove empty lines
  • Loading branch information
onlined committed Apr 11, 2019
commit 8d20e8133bb53cc284d1743e5fc8d894af81256a
2 changes: 0 additions & 2 deletions test-data/unit/check-isinstance.test
Original file line number Diff line number Diff line change
Expand Up @@ -2227,5 +2227,3 @@ var = 'some string'
if isinstance(var, *(str, int)): # E: Too many arguments for "isinstance"
pass
[builtins fixtures/isinstancelist.pyi]


4 changes: 4 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
two_types = (list, tuple)
third_type = str
if isinstance('text', *(str, int)):
print('hello')
0