pylint: add linter for bad comment styles
This adds the basis for linting comments and starts off with a simple
one: there should be a space right after the #.
This catches a bunch of places where we commented out code lines and
omitted the space on purpose, but I think that's an acceptable lose
to catch all the other scenarios.
Did a little refactoring of imports in our module to avoid extending
the hack at the end for automatically registering checkers.
BUG=None
TEST=`cros lint` catches a bunch of errors in here
Change-Id: Ibd234cbfa1672e5e743af161869cdb3d4d58801f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1832411
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/api/validate.py b/api/validate.py
index e4dfdef..93b4f7e 100644
--- a/api/validate.py
+++ b/api/validate.py
@@ -46,7 +46,7 @@
return value
-#pylint: disable=docstring-misnamed-args
+# pylint: disable=docstring-misnamed-args
def exists(*fields):
"""Validate that the paths in |fields| exist.
@@ -101,7 +101,7 @@
return decorator
-#pylint: disable=docstring-misnamed-args
+# pylint: disable=docstring-misnamed-args
def require(*fields):
"""Verify |fields| have all been set.