Freenove / Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi

Apply to FNK0043
Other
133 stars 148 forks source link

Checking if data2==None twice #42

Closed HarHarLinks closed 5 months ago

HarHarLinks commented 1 year ago

https://github.com/Freenove/Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi/blob/4c513154fb11cae7d11f924c7c11688daf611bd4/Code/Server/server.py#L197

https://github.com/Freenove/Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi/blob/4c513154fb11cae7d11f924c7c11688daf611bd4/Code/Server/server.py#L218

  1. data2 is checked twice.
  2. data4 is never checked. is this intentional?
  3. there are at least these 2 occurrences.
  4. please use is None instead of == None per PEP8 (https://www.flake8rules.com/rules/E711.html)
fire-eggs commented 1 year ago

Wow! Thank you for this, somehow I never noticed!

fire-eggs commented 5 months ago

Finally addressed.