3 ms·
Can you recommend a particular linter? I use flake8, which does not warn for this. I just tested pylint which also does not appear to warn for this.
by lukeschlather 8y ago
Can you recommend a particular linter? I use flake8, which does not warn for this. I just tested pylint which also does not appear to warn for this.
- heavenlyblue 8y agoPyCharm 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.