Skip to content

Commit

Permalink
check bools explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
k4yt3x committed Apr 2, 2022
1 parent bcb2e97 commit ebbe457
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions video2x/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run(self) -> None:

# continue running until an exception occurs
# or all frames have been decoded
while self.running:
while self.running is True:

# pause if pause flag is set
if self.pause.value is True:
Expand All @@ -140,7 +140,7 @@ def run(self) -> None:

# keep checking if the running flag is set to False
# while waiting to put the next image into the queue
while self.running:
while self.running is True:
with contextlib.suppress(queue.Full):
self.processing_queue.put(
(
Expand Down
2 changes: 1 addition & 1 deletion video2x/interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def run(self) -> None:
f"Interpolator process <blue>{self.name}</blue> initiating"
)
processor_objects = {}
while self.running:
while self.running is True:
try:
# pause if pause flag is set
if self.pause.value is True:
Expand Down
2 changes: 1 addition & 1 deletion video2x/pipe_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run(self) -> None:
self.running = True

# keep printing contents in the PIPE
while self.running:
while self.running is True:
time.sleep(0.5)

try:
Expand Down
2 changes: 1 addition & 1 deletion video2x/upscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def run(self) -> None:
f"Upscaler process <blue>{self.name}</blue> initiating"
)
processor_objects = {}
while self.running:
while self.running is True:
try:
# pause if pause flag is set
if self.pause.value is True:
Expand Down

0 comments on commit ebbe457

Please sign in to comment.