From 3dc324d3f1312e40d3a8ed87e7244966bb756f26 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sun, 22 Mar 2020 21:26:08 -0500 Subject: tests: Format all Python code with black, except tests in basics subdir. This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting. --- tests/extmod/machine_timer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/extmod/machine_timer.py') diff --git a/tests/extmod/machine_timer.py b/tests/extmod/machine_timer.py index b7e6a280f..c9a47c402 100644 --- a/tests/extmod/machine_timer.py +++ b/tests/extmod/machine_timer.py @@ -2,6 +2,7 @@ try: import utime, umachine as machine + machine.Timer except: print("SKIP") @@ -27,11 +28,11 @@ t2.deinit() t.deinit() # create one-shot timer with callback and wait for it to print (should be just once) -t = machine.Timer(period=1, mode=machine.Timer.ONE_SHOT, callback=lambda t:print('one-shot')) +t = machine.Timer(period=1, mode=machine.Timer.ONE_SHOT, callback=lambda t: print("one-shot")) utime.sleep_ms(5) t.deinit() # create periodic timer with callback and wait for it to print -t = machine.Timer(period=4, mode=machine.Timer.PERIODIC, callback=lambda t:print('periodic')) +t = machine.Timer(period=4, mode=machine.Timer.PERIODIC, callback=lambda t: print("periodic")) utime.sleep_ms(14) t.deinit() -- cgit v1.2.3