summaryrefslogtreecommitdiff
path: root/util/ec3po/interpreter.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/ec3po/interpreter.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/ec3po/interpreter.py')
-rw-r--r--util/ec3po/interpreter.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/util/ec3po/interpreter.py b/util/ec3po/interpreter.py
index 591603e038..bfe7d1ed8d 100644
--- a/util/ec3po/interpreter.py
+++ b/util/ec3po/interpreter.py
@@ -147,7 +147,9 @@ class Interpreter(object):
command: A string which contains the command to be sent.
"""
self.ec_cmd_queue.put(command)
- self.logger.log(1, "Commands now in queue: %d", self.ec_cmd_queue.qsize())
+ self.logger.log(
+ 1, "Commands now in queue: %d", self.ec_cmd_queue.qsize()
+ )
# Add the EC UART as an output to be serviced.
if self.connected and self.ec_uart_pty not in self.outputs:
@@ -215,12 +217,16 @@ class Interpreter(object):
self.inputs.remove(fileobj)
if fileobj in self.outputs:
self.outputs.remove(fileobj)
- self.logger.debug("Removed fileobj. Remaining inputs: %r", self.inputs)
+ self.logger.debug(
+ "Removed fileobj. Remaining inputs: %r", self.inputs
+ )
# Close the file.
fileobj.close()
# Mark the interpreter as disconnected now.
self.connected = False
- self.logger.debug("Disconnected from %s.", self.ec_uart_pty_name)
+ self.logger.debug(
+ "Disconnected from %s.", self.ec_uart_pty_name
+ )
return
elif command == b"reconnect":
@@ -248,7 +254,9 @@ class Interpreter(object):
# Ignore any other commands while in the disconnected state.
self.logger.log(1, "command: '%s'", command)
if not self.connected:
- self.logger.debug("Ignoring command because currently disconnected.")
+ self.logger.debug(
+ "Ignoring command because currently disconnected."
+ )
return
# Remove leading and trailing spaces only if this is an enhanced EC image.
@@ -354,7 +362,9 @@ class Interpreter(object):
if self.enhanced_ec:
self.logger.debug("The current EC image seems enhanced.")
else:
- self.logger.debug("The current EC image does NOT seem enhanced.")
+ self.logger.debug(
+ "The current EC image does NOT seem enhanced."
+ )
# Done interrogating.
self.interrogating = False
# For now, just forward everything the EC sends us.