File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
micropython/usb/usb-device/usb/device Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,9 @@ def maybe_set(value, idx):
166166 # Keep track of the interface and endpoint indexes
167167 itf_num = builtin_driver .itf_max
168168 ep_num = max (builtin_driver .ep_max , 1 ) # Endpoint 0 always reserved for control
169- while len (strs ) < builtin_driver .str_max - 1 : # This is possibly unnecessary or wrong because
169+ while (
170+ len (strs ) < builtin_driver .str_max - 1
171+ ): # This is possibly unnecessary or wrong because
170172 # https://docs.micropython.org/en/latest/library/machine.USBDevice.html
171173 # states all string values except index 0 should be plain ASCII
172174 strs .append (None ) # Reserve other string indexes used by builtin drivers
@@ -822,7 +824,7 @@ def pend_write(self, wmax=None):
822824 # (No critical section needed as self._w is only updated by the producer.)
823825 self ._w = (_w := self ._n )
824826 end = (_w + wmax ) if wmax else self ._l
825- return self ._b [_w : end ]
827+ return self ._b [_w : end ]
826828
827829 def finish_write (self , nbytes ):
828830 # Called by the producer to indicate it wrote nbytes into the buffer.
@@ -888,4 +890,4 @@ def readinto(self, b):
888890 if to_r :
889891 b [:to_r ] = pr [:to_r ]
890892 self .finish_read (to_r )
891- return to_r
893+ return to_r
You can’t perform that action at this time.
0 commit comments