aboutsummaryrefslogtreecommitdiff
path: root/tools/check_pycodestyle.py
diff options
context:
space:
mode:
authorBrett Warren <brett.warren@arm.com>2022-02-22 14:17:27 +0000
committertarek-arm <56722698+tarek-arm@users.noreply.github.com>2022-06-28 14:08:00 +0100
commit3b3e96df258affa5e0e7ac984020a56234c9198d (patch)
treea7d407f9c00787d3e5f5a73c02eec5924f675846 /tools/check_pycodestyle.py
parentbc811ff591f468927d2f501a35f18b9624ea729f (diff)
tools/check_pycodestyle: add configurable directories
Allow python files outside of tools/ to be checked. Signed-off-by: Brett Warren <brett.warren@arm.com> Change-Id: I27b0c9f6bf51cc1608862f54af73bcd6a15e4076
Diffstat (limited to 'tools/check_pycodestyle.py')
-rw-r--r--tools/check_pycodestyle.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/check_pycodestyle.py b/tools/check_pycodestyle.py
index 6194d7de221b..4517f84f533e 100644
--- a/tools/check_pycodestyle.py
+++ b/tools/check_pycodestyle.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# Arm SCP/MCP Software
-# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
@@ -13,6 +13,8 @@ This script runs pycodestyle to check all python scripts.
import sys
import subprocess
+INCLUDE_DIRECTORIES = "tools/"
+
def banner(text):
columns = 80
@@ -24,7 +26,7 @@ def main():
banner("Build and run PyCodeStyle tests")
result = subprocess.Popen(
- "python -m pycodestyle tools/",
+ "python -m pycodestyle {}".format(INCLUDE_DIRECTORIES),
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)