3 ms·
PyCharm would highlight the expression after : as a type that was not imported correctly (or an expression that is not a type). I would assume mypy would cause
by heavenlyblue 8y ago
PyCharm would highlight the expression after : as a type that was not imported correctly (or an expression that is not a type).
I would assume mypy would cause an error.
- lukeschlather 8y agoIf I wrap it in a function, mypy doesn't throw an error. I'm not sure if mypy has a function to lint such code without executing it.