msoon / PyMonsoon

Monsoon Power Monitor Python Library
MIT License
55 stars 23 forks source link

Fix errors, warnings, and a suggestion for improvement #10

Closed werwurm closed 7 years ago

werwurm commented 7 years ago

Hi, I started working with this library and threw it into my pydev eclipse IDE. It warned me about quite a few problems, i.e. indentation errors, unused imports, unused variables, and name collisions with reserved words such as "hex", "bytes", ... (see first patch) I also found some real logical bugs this way. (see second patch) The third patch is a suggestion as to how the serial number selective usb_setup could also be implemented. I made the implementation before I saw the newer version which already has such a feature. I thought, I share my solution anyway because I find it slightly more elegant. With kind regards