Closed drawks closed 3 years ago
This pull request fixes 2 alerts when merging 532c6e62fa4ecccd64a2728af8c15647a68728b1 into 1ca8e602c15ba9ed7737976d01c9d1ba10eafa40 - view on LGTM.com
fixed alerts:
Geez, thanks, @drawks ! LGTM directly reports that as error 🤦
__slots__
definition fromInterval
andIntervalSet
It took me a minute to figure this one out. So, the original code uses "old style" classes which means that the
__slots__
definition is a noop on python2, but on python3 you automatically get new style classes. Really this should be updated to use "new style" classes, but that would suddenly create compatibility issues between older versions of graphite-web AND also software such as carbonapi which works by mimicking the existing graphite-web behavior. By removing the__slots__
we get identical behavior on python2 and python3 which is a vanilla unslotted class instance that unpickles fine in both pyhton2 and python3 and works with carbonapi too.