Skip to content

Commit a080872

Browse files
jimmodpgeorge
authored andcommitted
top: Update Python formatting to black "2023 stable style".
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
1 parent c1526d2 commit a080872

File tree

20 files changed

+9
-23
lines changed

20 files changed

+9
-23
lines changed

micropython/bluetooth/aioble/aioble/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
_FLAG_NOTIFY = const(0x0010)
3535
_FLAG_INDICATE = const(0x0020)
3636

37+
3738
# Forward IRQs directly to static methods on the type that handles them and
3839
# knows how to map handles to instances. Note: We copy all uuid and data
3940
# params here for safety, but a future optimisation might be able to avoid

micropython/bluetooth/aioble/multitests/ble_write_order.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
CHAR_FIRST_UUID = bluetooth.UUID("00000000-1111-2222-3333-444444444444")
2222
CHAR_SECOND_UUID = bluetooth.UUID("00000000-1111-2222-3333-555555555555")
2323

24+
2425
# Acting in peripheral role.
2526
async def instance0_task():
2627
service = aioble.Service(SERVICE_UUID)

micropython/drivers/codec/wm8960/wm8960.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def __setitem__(self, reg, value):
244244

245245

246246
class WM8960:
247-
248247
_bit_clock_divider_table = {
249248
2: 0,
250249
3: 1,
@@ -399,7 +398,6 @@ def __init__(
399398
self.config_data_format(sysclk, sample_rate, bits)
400399

401400
def deinit(self):
402-
403401
self.set_module(MODULE_ADC, False)
404402
self.set_module(MODULE_DAC, False)
405403
self.set_module(MODULE_VREF, False)
@@ -467,33 +465,28 @@ def set_speaker_clock(self, sysclk):
467465
)
468466

469467
def set_module(self, module, is_enabled):
470-
471468
is_enabled = 1 if is_enabled else 0
472469
regs = self.regs
473470

474471
if module == MODULE_ADC:
475-
476472
regs[_POWER1] = (
477473
_POWER1_ADCL_MASK | _POWER1_ADCR_MASK,
478474
(_POWER1_ADCL_MASK | _POWER1_ADCR_MASK) * is_enabled,
479475
)
480476

481477
elif module == MODULE_DAC:
482-
483478
regs[_POWER2] = (
484479
_POWER2_DACL_MASK | _POWER2_DACR_MASK,
485480
(_POWER2_DACL_MASK | _POWER2_DACR_MASK) * is_enabled,
486481
)
487482

488483
elif module == MODULE_VREF:
489-
490484
regs[_POWER1] = (
491485
_POWER1_VREF_MASK,
492486
(is_enabled << _POWER1_VREF_SHIFT),
493487
)
494488

495489
elif module == MODULE_LINE_IN:
496-
497490
regs[_POWER1] = (
498491
_POWER1_AINL_MASK | _POWER1_AINR_MASK,
499492
(_POWER1_AINL_MASK | _POWER1_AINR_MASK) * is_enabled,
@@ -504,36 +497,31 @@ def set_module(self, module, is_enabled):
504497
)
505498

506499
elif module == MODULE_LINE_OUT:
507-
508500
regs[_POWER2] = (
509501
_POWER2_LOUT1_MASK | _POWER2_ROUT1_MASK,
510502
(_POWER2_LOUT1_MASK | _POWER2_ROUT1_MASK) * is_enabled,
511503
)
512504

513505
elif module == MODULE_MIC_BIAS:
514-
515506
regs[_POWER1] = (
516507
_POWER1_MICB_MASK,
517508
(is_enabled << _POWER1_MICB_SHIFT),
518509
)
519510

520511
elif module == MODULE_SPEAKER:
521-
522512
regs[_POWER2] = (
523513
_POWER2_SPKL_MASK | _POWER2_SPKR_MASK,
524514
(_POWER2_SPKL_MASK | _POWER2_SPKR_MASK) * is_enabled,
525515
)
526516
regs[_CLASSD1] = 0xF7
527517

528518
elif module == MODULE_OMIX:
529-
530519
regs[_POWER3] = (
531520
_POWER3_LOMIX_MASK | _POWER3_ROMIX_MASK,
532521
(_POWER3_LOMIX_MASK | _POWER3_ROMIX_MASK) * is_enabled,
533522
)
534523

535524
elif module == MODULE_MONO_OUT:
536-
537525
regs[_MONOMIX1] = regs[_MONOMIX2] = is_enabled << 7
538526
regs[_MONO] = is_enabled << 6
539527

micropython/drivers/display/ssd1306/ssd1306.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
SET_VCOM_DESEL = const(0xDB)
2525
SET_CHARGE_PUMP = const(0x8D)
2626

27+
2728
# Subclassing FrameBuffer provides support for graphics primitives
2829
# http://docs.micropython.org/en/latest/pyboard/library/framebuf.html
2930
class SSD1306(framebuf.FrameBuffer):

micropython/drivers/storage/sdcard/sdcard.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def init_spi(self, baudrate):
6464
self.spi.init(master, baudrate=baudrate, phase=0, polarity=0)
6565

6666
def init_card(self, baudrate):
67-
6867
# init CS pin
6968
self.cs.init(self.cs.OUT, value=1)
7069

micropython/umqtt.robust/umqtt/robust.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class MQTTClient(simple.MQTTClient):
6-
76
DELAY = 2
87
DEBUG = False
98

micropython/umqtt.simple/example_sub.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Publish test messages e.g. with:
55
# mosquitto_pub -t foo_topic -m hello
66

7+
78
# Received messages from subscriptions will be delivered to this callback
89
def sub_cb(topic, msg):
910
print((topic, msg))

python-stdlib/contextlib/tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_suppress(self):
3737

3838

3939
class TestExitStack(unittest.TestCase):
40-
4140
# @support.requires_docstrings
4241
def _test_instance_docs(self):
4342
# Issue 19330: ensure context manager instances have good docstrings

python-stdlib/copy/copy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ def _reconstruct(x, info, deep, memo=None):
374374

375375
del types
376376

377+
377378
# Helper for instance creation without calling __init__
378379
class _EmptyClass:
379380
pass

python-stdlib/json/json/encoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ def _make_iterencode(
294294
str=str,
295295
tuple=tuple,
296296
):
297-
298297
if _indent is not None and not isinstance(_indent, str):
299298
_indent = " " * _indent
300299

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy