mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Replace Event.wait(0) with Event.is_set()
The functionality is identical, and IMHO the latter is much more readable
This commit is contained in:
@@ -162,7 +162,7 @@ class SmoothedInputDevice(EventsMixin, InputDevice):
|
||||
except DeviceClosed:
|
||||
return super(SmoothedInputDevice, self).__repr__()
|
||||
else:
|
||||
if self.partial or self._queue.full.wait(0):
|
||||
if self.partial or self._queue.full.is_set():
|
||||
return super(SmoothedInputDevice, self).__repr__()
|
||||
else:
|
||||
return "<gpiozero.%s object on pin=%r, pull_up=%s>" % (
|
||||
|
||||
Reference in New Issue
Block a user