Skip to content

Commit

Permalink
Fix unpack exception #209
Browse files Browse the repository at this point in the history
mypy can't even find this bug?
  • Loading branch information
xxyzz committed Apr 22, 2024
1 parent bcab9a8 commit 5ae5914
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ select = [
exclude = ["tests", "__main__", "docs"]
explicit_package_bases = true
check_untyped_defs = true
# strict = True
# strict = true

[[tool.mypy.overrides]]
module = "calibre.*"
Expand Down
8 changes: 5 additions & 3 deletions ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ def genesis(self):
def config(self):
self.interface_action_base_plugin.do_user_config(self.gui)

def open_custom_x_ray_dialog(self):
for _, _, book_paths, mi, _ in get_metadata_of_selected_books(self.gui, True):
custom_x_dlg = CustomXRayDialog(book_paths[0], mi.get("title"), self.gui)
def open_custom_x_ray_dialog(self) -> None:
for md_result in get_metadata_of_selected_books(self.gui, True):
custom_x_dlg = CustomXRayDialog(
md_result.book_paths[0], md_result.mi.get("title"), self.gui
)
if custom_x_dlg.exec():
custom_x_dlg.x_ray_model.save_data()

Expand Down

0 comments on commit 5ae5914

Please sign in to comment.