cros lint: check the indentation level of section arguments
Sometimes the indentation of things like "Args:" is incorrect.
Add a linter check for it and fix up all the existing errors.
BUG=chromium:485005
TEST=`cros lint` on all files pass, and catches some bad cases
Change-Id: I79ea60d1e07c40d9283284bdaebfcda5af4e6246
Reviewed-on: https://chromium-review.googlesource.com/269642
Trybot-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros_mark_chrome_as_stable.py b/scripts/cros_mark_chrome_as_stable.py
index 1e47eb3..1de3d30 100644
--- a/scripts/cros_mark_chrome_as_stable.py
+++ b/scripts/cros_mark_chrome_as_stable.py
@@ -61,7 +61,7 @@
"""Returns the current Chromium version, from the contents of a VERSION file.
Args:
- chrome_version_info: The contents of a chromium VERSION file.
+ chrome_version_info: The contents of a chromium VERSION file.
"""
chrome_version_array = []
for line in chrome_version_info.splitlines():
@@ -74,10 +74,10 @@
"""Returns the Chromium version, from a repository URL and version.
Args:
- git_url: Repository URL for chromium.
- revision: the git revision we want to use.
- time_to_wait: the minimum period before abandoning our wait for the
- desired revision to be present.
+ git_url: Repository URL for chromium.
+ revision: the git revision we want to use.
+ time_to_wait: the minimum period before abandoning our wait for the
+ desired revision to be present.
"""
parsed_url = urlparse.urlparse(git_url)
host = parsed_url[1]
@@ -106,7 +106,7 @@
"""Returns the current Chromium version, from a file in a checkout.
Args:
- root: path to the root of the chromium checkout.
+ root: path to the root of the chromium checkout.
"""
version_file = os.path.join(root, 'src', 'chrome', 'VERSION')
chrome_version_info = cros_build_lib.RunCommand(
diff --git a/scripts/cros_mark_mojo_as_stable.py b/scripts/cros_mark_mojo_as_stable.py
index cac158c..adc0051 100644
--- a/scripts/cros_mark_mojo_as_stable.py
+++ b/scripts/cros_mark_mojo_as_stable.py
@@ -44,10 +44,10 @@
"""Gets all stable ebuilds from the given directory.
Args:
- ebuild_dir: Path to the directory to look in.
+ ebuild_dir: Path to the directory to look in.
Returns:
- An array of ebuilds in the given directory.
+ An array of ebuilds in the given directory.
"""
return [x for x in os.listdir(ebuild_dir)
if x.endswith('.ebuild') and not
diff --git a/scripts/parallel_emerge.py b/scripts/parallel_emerge.py
index 689d3a2..c1cb2be 100644
--- a/scripts/parallel_emerge.py
+++ b/scripts/parallel_emerge.py
@@ -534,8 +534,8 @@
"""Print the deps we have seen in the emerge output.
Args:
- deps: Dependency tree structure.
- depth: Allows printing the tree recursively, with indentation.
+ deps: Dependency tree structure.
+ depth: Allows printing the tree recursively, with indentation.
"""
for entry in sorted(deps):
action = deps[entry]["action"]
diff --git a/scripts/upload_prebuilts.py b/scripts/upload_prebuilts.py
index 85c8fd4..8744274 100644
--- a/scripts/upload_prebuilts.py
+++ b/scripts/upload_prebuilts.py
@@ -263,12 +263,12 @@
def GetBoardOverlay(build_path, target):
"""Get the path to the board variant.
- Args:
- build_path: The path to the root of the build directory
- target: The target board as a BuildTarget object.
+ Args:
+ build_path: The path to the root of the build directory
+ target: The target board as a BuildTarget object.
- Returns:
- The last overlay configured for the given board as a string.
+ Returns:
+ The last overlay configured for the given board as a string.
"""
board = target.board_variant
overlays = portage_util.FindOverlays(constants.BOTH_OVERLAYS, board,