From da4c2cfc01dc2881e685c5ebba84ce065cdea085 Mon Sep 17 00:00:00 2001 From: rdbende Date: Mon, 11 Dec 2023 21:22:06 +0100 Subject: [PATCH] Clean up imports --- cozy/ui/library_view.py | 7 +++---- cozy/view_model/library_view_model.py | 8 -------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cozy/ui/library_view.py b/cozy/ui/library_view.py index 3e530919..b97f0261 100644 --- a/cozy/ui/library_view.py +++ b/cozy/ui/library_view.py @@ -1,14 +1,13 @@ import functools from typing import Optional -from gi.repository import Gtk, Adw -from gi.repository.Gtk import Builder +from gi.repository import Adw, Gtk from cozy.ext import inject from cozy.ui.widgets.book_element import BookElement from cozy.ui.delete_book_view import DeleteBookView from cozy.ui.widgets.filter_list_box import FilterListBox -from cozy.view_model.library_view_model import LibraryViewModel, LibraryViewMode, LibraryPage +from cozy.view_model.library_view_model import LibraryViewModel, LibraryViewMode READER_PAGE = "reader" AUTHOR_PAGE = "author" @@ -23,7 +22,7 @@ class LibraryView: _view_model: LibraryViewModel = inject.attr(LibraryViewModel) - def __init__(self, builder: Builder): + def __init__(self, builder: Gtk.Builder): self._builder = builder self._connected_book_element: Optional[BookElement] = None diff --git a/cozy/view_model/library_view_model.py b/cozy/view_model/library_view_model.py index eac3280a..71079633 100644 --- a/cozy/view_model/library_view_model.py +++ b/cozy/view_model/library_view_model.py @@ -3,8 +3,6 @@ from enum import Enum, auto from typing import Optional -from gi.repository import Gtk - import cozy.ext.inject as inject from cozy.application_settings import ApplicationSettings from cozy.architecture.event_sender import EventSender @@ -31,12 +29,6 @@ class LibraryViewMode(Enum): READER = auto() -class LibraryPage(Enum): - NONE = auto() - FILTER = auto() - BOOKS = auto() - - class LibraryViewModel(Observable, EventSender): _application_settings: ApplicationSettings = inject.attr(ApplicationSettings) _fs_monitor: FilesystemMonitor = inject.attr("FilesystemMonitor")