Skip to content

Commit 8a15f4f

Browse files
committed
Run pre-commit
1 parent 69d333f commit 8a15f4f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

adafruit_shell.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def run_command(self, cmd, suppress_message=False, return_output=False):
6969
"""
7070
Run a shell command and show the output as it runs
7171
"""
72+
7273
def read_stream(output):
7374
fd = output.fileno()
7475
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
@@ -84,7 +85,7 @@ def read_stream(output):
8485
shell=True,
8586
stdout=subprocess.PIPE,
8687
stderr=subprocess.PIPE,
87-
universal_newlines=True
88+
universal_newlines=True,
8889
) as proc:
8990
while proc.poll() is None:
9091
err = read_stream(proc.stderr)

test.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
try:
22
from adafruit_shell import Shell
33
except ImportError:
4-
raise RuntimeError("The library 'adafruit_shell' was not found. To install, try typing: sudo pip3 install adafruit-python-shell")
4+
raise RuntimeError(
5+
"The library 'adafruit_shell' was not found. To install, try typing: sudo pip3 install adafruit-python-shell"
6+
)
57

68
shell = Shell()
7-
shell.group="Blinka"
9+
shell.group = "Blinka"
10+
811

912
def main():
10-
#shell.clear()
13+
# shell.clear()
1114
print("Running test")
1215
shell.run_command("./test.sh")
1316

17+
1418
# Main function
1519
if __name__ == "__main__":
16-
main()
20+
main()

test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ echo Interactive Test
44
>&2 echo This should also go to stderr
55
read -p "Hello, who am I speaking to? " NAME
66
echo It\'s Nice to meet you $NAME
7-

0 commit comments

Comments
 (0)