Either:
dict[k, v] is meant to be supported.x: dict[k, v] for being invalid.dict[k, v] as a type.x: Dict[str, str] = {'foo': 'bar'}
x = dict(x)
y: dict[str, str] = {'foo': 'bar'}
x = y
PyLance:
"dict[str, str]" is incompatible with "Dict[str, str]"Pylance (reportGeneralTypeIssues)
Where:
x has type Dict[]dict(x) has type dict[]yLogic bug.
This template feels sort of inverted. Maybe merge "Code" and "Actual Behavior" and place them before "Expected Behavior"?
I'm tracking the same bug here: https://github.com/microsoft/pyright/issues/1120. The problem is that I'm not able to repro the problem, and it appears to be sporadic. I assume it has to do with some aspect of the type analyzers internal caching mechanism.
I found and fixed the root cause of this problem. The fix will be in the next release.
I've noticed the same issue with list vs List.

@ElijahSink I believe that'll also be fixed.
This issue has been fixed in version 2020.11.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020110-4-november-2020
Most helpful comment
I found and fixed the root cause of this problem. The fix will be in the next release.