Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 17, 2023
1 parent 183129a commit 6a5e83b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/AutoSplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def __similarity_threshold_loop(self, number_of_split_images: int, dummy_splits_
self.previous_image_button.setEnabled(self.split_image_number != 0)
if not self.is_auto_controlled:
# If its the last non-dummy split image and last loop number, disable the skip split button
self.skip_split_button.setEnabled(dummy_splits_array[self.split_image_number :].count(False) > 1)
self.skip_split_button.setEnabled(dummy_splits_array[self.split_image_number:].count(False) > 1)
self.undo_split_button.setEnabled(self.split_image_number != 0)
QApplication.processEvents()

Expand Down
4 changes: 2 additions & 2 deletions src/capture_method/VideoCaptureDeviceCaptureMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def get_frame(self, autosplit: AutoSplit):
y = min(selection["y"], image.shape[ImageShape.Y] - 1)
x = min(selection["x"], image.shape[ImageShape.X] - 1)
image = image[
y : y + selection["height"],
x : x + selection["width"],
y: y + selection["height"],
x: x + selection["width"],
]
return cv2.cvtColor(image, cv2.COLOR_BGR2BGRA), is_old_image

Expand Down
4 changes: 2 additions & 2 deletions src/capture_method/WindowsGraphicsCaptureMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ async def coroutine():
image = np.frombuffer(cast(bytes, reference), dtype=np.uint8)
image.shape = (self.size.height, self.size.width, BGRA_CHANNEL_COUNT)
image = image[
selection["y"] : selection["y"] + selection["height"],
selection["x"] : selection["x"] + selection["width"],
selection["y"]: selection["y"] + selection["height"],
selection["x"]: selection["x"] + selection["width"],
]
self.last_captured_frame = image
return image, False
Expand Down
4 changes: 2 additions & 2 deletions src/menu_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, autosplit: AutoSplit):
# self.capture_method_combobox.setView(list_view)

self.capture_method_combobox.addItems(
[f"- {method.name} ({method.short_description})" for method in capture_method_values]
[f"- {method.name} ({method.short_description})" for method in capture_method_values],
)
self.capture_method_combobox.setToolTip(
"\n\n".join([f"{method.name} :\n{method.description}" for method in capture_method_values]),
Expand Down Expand Up @@ -244,7 +244,7 @@ def __set_all_capture_devices(self):
+ (f" [{device.backend}]" if device.backend else "")
+ (" (occupied)" if device.occupied else "")
for device in self.__video_capture_devices
]
],
)
self.__enable_capture_device_if_its_selected_method()
else:
Expand Down

0 comments on commit 6a5e83b

Please sign in to comment.