diff --git a/qt/aqt/browser/__init__.py b/qt/aqt/browser/__init__.py index 15e42606f..4ce6d4e92 100644 --- a/qt/aqt/browser/__init__.py +++ b/qt/aqt/browser/__init__.py @@ -37,3 +37,5 @@ from .table import ( # aliases for legacy pathnames sys.modules["aqt.find_and_replace"] = sys.modules["aqt.browser.dialogs"] aqt.find_and_replace = sys.modules["aqt.browser.dialogs"] # type: ignore +sys.modules["aqt.sidebar"] = sys.modules["aqt.browser.sidebar"] +aqt.sidebar = sys.modules["aqt.browser.sidebar"] # type: ignore diff --git a/qt/aqt/browser/sidebar/__init__.py b/qt/aqt/browser/sidebar/__init__.py index 5eaef6809..f7c73c32a 100644 --- a/qt/aqt/browser/sidebar/__init__.py +++ b/qt/aqt/browser/sidebar/__init__.py @@ -1,8 +1,5 @@ # Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import sys - -import aqt from anki.utils import isMac from aqt.theme import theme_manager @@ -16,7 +13,3 @@ from .model import SidebarModel from .searchbar import SidebarSearchBar from .toolbar import SidebarTool, SidebarToolbar from .tree import SidebarStage, SidebarTreeView - -# alias for the legacy pathname -sys.modules["aqt.sidebar"] = sys.modules["aqt.browser.sidebar"] -aqt.sidebar = sys.modules["aqt.browser.sidebar"] # type: ignore