mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
fix: Linting Errors & VS Code config
- Add additional settings to VS Code for formatter changes in plugins - Fix black formatting - Fix flake8 errors due to long lines - Fix flake8 errors due to type comparisons
This commit is contained in:
@@ -58,36 +58,44 @@ class ViewerToolBar(QToolBar):
|
||||
(
|
||||
"actionZoomIn",
|
||||
QKeySequence.ZoomIn,
|
||||
QIcon.fromTheme("zoom-in")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_in")),
|
||||
(
|
||||
QIcon.fromTheme("zoom-in")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_in"))
|
||||
),
|
||||
tr("Increase zoom"),
|
||||
controller.zoomIn,
|
||||
),
|
||||
(
|
||||
"actionZoomOut",
|
||||
QKeySequence.ZoomOut,
|
||||
QIcon.fromTheme("zoom-out")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_out")),
|
||||
(
|
||||
QIcon.fromTheme("zoom-out")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_out"))
|
||||
),
|
||||
tr("Decrease zoom"),
|
||||
controller.zoomOut,
|
||||
),
|
||||
(
|
||||
"actionNormalSize",
|
||||
tr("Ctrl+/"),
|
||||
QIcon.fromTheme("zoom-original")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_original")),
|
||||
(
|
||||
QIcon.fromTheme("zoom-original")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_original"))
|
||||
),
|
||||
tr("Normal size"),
|
||||
controller.zoomNormalSize,
|
||||
),
|
||||
(
|
||||
"actionBestFit",
|
||||
tr("Ctrl+*"),
|
||||
QIcon.fromTheme("zoom-best-fit")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_best_fit")),
|
||||
(
|
||||
QIcon.fromTheme("zoom-best-fit")
|
||||
if ISLINUX and not self.parent.app.prefs.details_dialog_override_theme_icons
|
||||
else QIcon(QPixmap(":/" + "zoom_best_fit"))
|
||||
),
|
||||
tr("Best fit"),
|
||||
controller.zoomBestFit,
|
||||
),
|
||||
|
||||
@@ -29,7 +29,7 @@ class File(PhotoBase):
|
||||
def _plat_get_blocks(self, block_count_per_side, orientation):
|
||||
image = QImage(str(self.path))
|
||||
image = image.convertToFormat(QImage.Format_RGB888)
|
||||
if type(orientation) != int:
|
||||
if not isinstance(orientation, int):
|
||||
logging.warning(
|
||||
"Orientation for file '%s' was a %s '%s', not an int.",
|
||||
str(self.path),
|
||||
|
||||
Reference in New Issue
Block a user