ROCm / amdsmi

AMD SMI
https://rocm.docs.amd.com/projects/amdsmi/en/latest
MIT License
29 stars 12 forks source link

fix(python): fix comparison to None #34

Closed e-kwsm closed 1 week ago

e-kwsm commented 1 month ago

from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations):

Comparisons to singletons like None should always be done with is or is not, never the equality operators.

marifamd commented 1 week ago

Thank you for pointing this out, however with argparse we have the possibility of None type objects specifically, so that is why args.x == None is being used

e-kwsm commented 1 week ago

This is the correct way to compare an object against None.