@@ -165,8 +165,8 @@ def _update_coils(self, *, microstepping=False):
165
165
duty_cycles [leading_coil ] = self ._curve [microstep ]
166
166
duty_cycles [trailing_coil ] = self ._curve [self ._microsteps - microstep ]
167
167
168
- # This ensures DOUBLE steps use full torque. Without it, we'd use partial torque from the
169
- # microstepping curve (0xb504).
168
+ # This ensures DOUBLE steps use full torque. Without it, we'd use
169
+ # partial torque from the microstepping curve (0xb504).
170
170
if not microstepping and (
171
171
duty_cycles [leading_coil ] == duty_cycles [trailing_coil ]
172
172
and duty_cycles [leading_coil ] > 0
@@ -187,7 +187,7 @@ def release(self):
187
187
else :
188
188
coil .duty_cycle = 0
189
189
190
- def onestep (self , * , direction = FORWARD , style = SINGLE ):
190
+ def onestep (self , * , direction = FORWARD , style = SINGLE ): #pylint: disable=too-many-branches
191
191
"""Performs one step of a particular style. The actual rotation amount will vary by style.
192
192
`SINGLE` and `DOUBLE` will normal cause a full step rotation. `INTERLEAVE` will normally
193
193
do a half step rotation. `MICROSTEP` will perform the smallest configured step.
@@ -221,12 +221,12 @@ def onestep(self, *, direction=FORWARD, style=SINGLE):
221
221
else :
222
222
half_step = self ._microsteps // 2
223
223
full_step = self ._microsteps
224
- # Its possible the previous steps were MICROSTEPS so first align with the interleave
225
- # pattern.
224
+ # Its possible the previous steps were MICROSTEPS so first align
225
+ # with the interleave pattern.
226
226
additional_microsteps = self ._current_microstep % half_step
227
227
if additional_microsteps != 0 :
228
- # We set _current_microstep directly because our step size varies depending on the
229
- # direction.
228
+ # We set _current_microstep directly because our step size varies
229
+ # depending on the direction.
230
230
if direction == FORWARD :
231
231
self ._current_microstep += half_step - additional_microsteps
232
232
else :
0 commit comments