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

Crash in invalid star assignment #12560

Closed
tushar-deepsource opened this issue Apr 11, 2022 · 2 comments
Closed

Crash in invalid star assignment #12560

tushar-deepsource opened this issue Apr 11, 2022 · 2 comments
Labels

Comments

@tushar-deepsource
Copy link
Contributor

tushar-deepsource commented Apr 11, 2022

Crash Report

Mypy crashes on using a single starred item as an l-value.

Traceback

$ mypy assignment.py --show-traceback
assignment.py:1: error: Starred assignment target must be in a list or tuple
assignment.py:1: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.942
Traceback (most recent call last):
  File "mypy/checkexpr.py", line 3978, in accept
  File "mypy/nodes.py", line 2012, in accept
  File "mypy/checkexpr.py", line 3293, in visit_list_expr
  File "mypy/checkexpr.py", line 3347, in check_lst_expr
  File "mypy/checkexpr.py", line 940, in check_call
  File "mypy/checkexpr.py", line 1025, in check_callable_call
  File "mypy/checkexpr.py", line 1173, in infer_function_type_arguments_using_context
  File "mypy/erasetype.py", line 115, in replace_meta_vars
  File "mypy/types.py", line 1965, in accept
AssertionError: 
assignment.py:1: : note: use --pdb to drop into pdb

To Reproduce

*x = [1]

Your Environment

  • Mypy version used: v0.942
  • Python version used: 3.10.0
  • Operating system and version: MacOS Monterey
@AlexWaygood
Copy link
Member

Think this might be a duplicate of #9137

@tushar-deepsource
Copy link
Contributor Author

Yup, it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants