HP6632b.check_error_queue / hp6632b.py#L471 raises the following warning:
hp6632b.py:471: DeprecationWarning: using non-Enums in containment checks will raise TypeError in Python 3.8
On this line we are doing this:
where err is an int.
This should be changed to:
err in set(item.value for item in self.ErrorCodes)
or we can add a class method to the enum:
@classmethod
def has_value(cls, value):
return any(value == item.value for item in cls)
We can even do a lazy-cache for this set to avoid regeneration on every HP6632b.check_error_queue call
HP6632b.check_error_queue/hp6632b.py#L471raises the following warning:On this line we are doing this:
where
erris anint.This should be changed to:
or we can add a class method to the enum:
We can even do a lazy-cache for this set to avoid regeneration on every
HP6632b.check_error_queuecall