3 ms·
Pylint doesn't actually import the code, just parses and processes the resulting AST, which is in my opinion how it should be done. The guard is useful if your
by icebraining 11y ago
Pylint doesn't actually import the code, just parses and processes the resulting AST, which is in my opinion how it should be done.
The guard is useful if your code is already composed of multiple functions/classes, which could be called from outside without running the full logic, but in this case I'm not sure it applies.
- falcolas 11y agoFair enough, pylint and pep8 do not. Pychecker, pydoc, doctest, unittest... many other tools which are part of the typical Python development flow do.