File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ def build_module_map():
170
170
search_identifier = ADDITIONAL_MODULES [module ]
171
171
else :
172
172
search_identifier = "CIRCUITPY_" + module .lstrip ("_" ).upper ()
173
- re_pattern = f "{ re .escape (search_identifier )} \s*\??=\s*(.+)"
173
+ re_pattern = fr "{ re .escape (search_identifier )} \s*\??=\s*(.+)"
174
174
find_config = re .findall (re_pattern , configs )
175
175
if not find_config :
176
176
continue
@@ -242,12 +242,12 @@ def get_repository_url(directory):
242
242
with open (readme , "r" ) as fp :
243
243
for line in fp .readlines ():
244
244
if m := re .match (
245
- "\s+:target:\s+(http\S+(docs.circuitpython|readthedocs)\S+)\s*" ,
245
+ r "\s+:target:\s+(http\S+(docs.circuitpython|readthedocs)\S+)\s*" ,
246
246
line ,
247
247
):
248
248
path = m .group (1 )
249
249
break
250
- if m := re .search ("<(http[^>]+)>" , line ):
250
+ if m := re .search (r "<(http[^>]+)>" , line ):
251
251
path = m .group (1 )
252
252
break
253
253
if path is None :
Original file line number Diff line number Diff line change 59
59
//| from board import *
60
60
//|
61
61
//| i2c = busio.I2C(SCL, SDA)
62
+ //| i2c.try_lock()
62
63
//| print(i2c.scan())
64
+ //| i2c.unlock()
63
65
//| i2c.deinit()
64
66
//|
65
- //| This example will initialize the the device, run
66
- //| :py:meth:`~busio.I2C.scan` and then :py:meth:`~busio.I2C.deinit` the
67
- //| hardware. The last step is optional because CircuitPython automatically
67
+ //| This example will initialize the the device, lock the I2C bus, run
68
+ //| :py:meth:`~busio.I2C.scan`, unlock the bus,
69
+ //| and then :py:meth:`~busio.I2C.deinit` the hardware.
70
+ //| The last step is optional because CircuitPython automatically
68
71
//| resets hardware after a program finishes.
69
72
//|
70
73
//| Note that drivers will typically handle communication if provided the bus
Original file line number Diff line number Diff line change 139
139
# Flush so we will see something before 10 minutes has passed.
140
140
print (flush = True )
141
141
142
- if (not build_all ) and (language is LANGUAGE_FIRST ) and (exit_status is 0 ):
142
+ if (not build_all ) and (language == LANGUAGE_FIRST ) and (exit_status == 0 ):
143
143
try :
144
144
with open (
145
145
f"../ports/{ board_info ['port' ]} /{ build_dir } /firmware.size.json" , "r"
You can’t perform that action at this time.
0 commit comments