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():
170170 search_identifier = ADDITIONAL_MODULES [module ]
171171 else :
172172 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*(.+)"
174174 find_config = re .findall (re_pattern , configs )
175175 if not find_config :
176176 continue
@@ -242,12 +242,12 @@ def get_repository_url(directory):
242242 with open (readme , "r" ) as fp :
243243 for line in fp .readlines ():
244244 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*" ,
246246 line ,
247247 ):
248248 path = m .group (1 )
249249 break
250- if m := re .search ("<(http[^>]+)>" , line ):
250+ if m := re .search (r "<(http[^>]+)>" , line ):
251251 path = m .group (1 )
252252 break
253253 if path is None :
Original file line number Diff line number Diff line change 5959//| from board import *
6060//|
6161//| i2c = busio.I2C(SCL, SDA)
62+ //| i2c.try_lock()
6263//| print(i2c.scan())
64+ //| i2c.unlock()
6365//| i2c.deinit()
6466//|
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
6871//| resets hardware after a program finishes.
6972//|
7073//| Note that drivers will typically handle communication if provided the bus
Original file line number Diff line number Diff line change 139139 # Flush so we will see something before 10 minutes has passed.
140140 print (flush = True )
141141
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 ):
143143 try :
144144 with open (
145145 f"../ports/{ board_info ['port' ]} /{ build_dir } /firmware.size.json" , "r"
You can’t perform that action at this time.
0 commit comments