Description
-
Are you reporting a bug, or opening a feature request?
Bug -
Please insert below the code you are checking with mypy...
from typing import Tuple
_behaviors = dict(headless=False, verbose=False,
dryrun=False, timeout=30)
print(type(_behaviors['headless'])) # bool
print(type(_behaviors['verbose'])) # bool
print(type(_behaviors['dryrun'])) # bool
print(type(_behaviors['timeout'])) # int
options: Tuple[bool, bool, bool, int] = (
_behaviors['headless'], _behaviors['verbose'],
_behaviors['dryrun'], _behaviors['timeout'])
- What is the actual behavior/output?
sample.py:11: error: Incompatible types in assignment (expression has type "Tuple[int, int, int, int]", variable has type "Tuple[bool, bool, bool, int]")
-
What is the behavior/output you expect?
I wouldn't expect mypy to see 'options' variable asTuple[int, int, int, int]
, but ratherTuple[bool, bool, bool, int]
-
What are the versions of mypy and Python you are using?
Python 3.7.1
mypy 0.701 -
Do you see the same issue after installing mypy from Git master?
yes -
What are the mypy flags you are using? (For example --strict-optional)
This occurs without any flags
Screenshot attached for some visuals. (The small script above is a simplified repro that still causes the error.)