Re:Sssgen: Make static websites simple again
by icebraining on Tuesday December 08, 2015 @11:10AM
(#10697210)
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.
It can create a fair bit of boilerplate (relative to your average Python boilerplate), but the `if name == "__main__":` guard keeps this under control.
[0] https://github.com/edmund-huber/sssgen/blob/master/bin/sssge...