summaryrefslogtreecommitdiff
path: root/util/ec_openocd.py
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-07-14 14:19:14 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-26 19:43:40 +0000
commitf37d95b3edc6ff7bbda96fe7a4147273db66c306 (patch)
treeaaf408cfa525efce460cddb4153101b1db492109 /util/ec_openocd.py
parent160af3cb3634f645ef0ca1a3c312c68cc3316869 (diff)
downloadchrome-ec-f37d95b3edc6ff7bbda96fe7a4147273db66c306.tar.gz
ec: Switch black to 80 cols and reformat files
Add pyproject.toml config file to set black to 80 columns. Remove column length overrides from other config files. Reformat python files to 80 cols. BRANCH=None BUG=b:238434058 TEST=presubmit/CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I870a68f1bb751f4bad97024045f6e3075489e80f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3764071 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'util/ec_openocd.py')
-rwxr-xr-xutil/ec_openocd.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/util/ec_openocd.py b/util/ec_openocd.py
index 11956ffa1c..bff3e801ec 100755
--- a/util/ec_openocd.py
+++ b/util/ec_openocd.py
@@ -83,7 +83,10 @@ def debug(interface, board, port, executable):
openocd_args += ["-c", f"gdb_port {port}"]
openocd = subprocess.Popen(
- openocd_args, encoding="utf-8", stdout=subprocess.PIPE, stderr=subprocess.STDOUT
+ openocd_args,
+ encoding="utf-8",
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
)
# Wait for OpenOCD to start, it'll open a port for GDB connections
@@ -213,11 +216,15 @@ def main():
target_file = args.file.resolve()
if args.command == "flash":
- image_file = get_flash_file(args.board) if target_file == None else target_file
+ image_file = (
+ get_flash_file(args.board) if target_file == None else target_file
+ )
flash(args.interface, args.board, image_file, args.verify)
elif args.command == "debug":
executable_file = (
- get_executable_file(args.board) if target_file == None else target_file
+ get_executable_file(args.board)
+ if target_file == None
+ else target_file
)
debug(args.interface, args.board, args.port, executable_file)
else: