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):
166
166
# Keep track of the interface and endpoint indexes
167
167
itf_num = builtin_driver .itf_max
168
168
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
170
172
# https://docs.micropython.org/en/latest/library/machine.USBDevice.html
171
173
# states all string values except index 0 should be plain ASCII
172
174
strs .append (None ) # Reserve other string indexes used by builtin drivers
@@ -822,7 +824,7 @@ def pend_write(self, wmax=None):
822
824
# (No critical section needed as self._w is only updated by the producer.)
823
825
self ._w = (_w := self ._n )
824
826
end = (_w + wmax ) if wmax else self ._l
825
- return self ._b [_w : end ]
827
+ return self ._b [_w : end ]
826
828
827
829
def finish_write (self , nbytes ):
828
830
# Called by the producer to indicate it wrote nbytes into the buffer.
@@ -888,4 +890,4 @@ def readinto(self, b):
888
890
if to_r :
889
891
b [:to_r ] = pr [:to_r ]
890
892
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