You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are sorry for this. This is yet another duplicate of #4872 (already high priority). The current workaround is to use a temporary variable:
fromtypingimportOptionalfromtempfileimportmkstempdeffoo(path: Optional[str]):
ifpathisNone:
f, _path=mkstemp('f')
path=_path# add link to this issue for future readers of your code
I have problems with mkstemp, which return type is
Tuple[int, AnyStr]
. I can't assign the second returned value to anOptional[str]
:With
mypy 0.600
andPython 3.6.2
, I get the error:The text was updated successfully, but these errors were encountered: