Comparison to literal
416 """Sends command to rotate clockwise or anti-clockwise for specified amount of degrees"""
417 logging.debug("Sending command: cw()")
418 if 1 <= degrees <= 360:
419 if direction is "cw":420 return self.run(
421 f"cw {str(degrees)}",
422 f"Rotating clockwise {str(degrees)} degrees \r\n",
Comparison to literal
421 f"cw {str(degrees)}",
422 f"Rotating clockwise {str(degrees)} degrees \r\n",
423 )
424 if direction is "ccw":425 return self.run(
426 f"ccw {str(degrees)}",
427 f"Rotating counter-clockwise {str(degrees)} degrees \r\n",
Description
Comparing an object to a literal is usually something you do not want to do, since you can compare to a different literal than what was expected altogether.