sysinfo
sysinfo copied to clipboard
@classmethod annotation used when not needed
https://github.com/Alwayswithme/sysinfo/blob/6a44e993dd38108a5736f31a142d73e8f75f6660/sysinfo.py#L27
Using @staticmethod
should be sufficient as nothing depends on cls
self variable.
@staticmethod
def product():
cmd = 'dmidecode -s system-product-name | head -1'
output = sh(cmd, True)
return Info('Product', output.strip())
thanks for your advice, it not very Pythonic