From 2e9c1266201b86c4b475b1e5b2e90618d9c121f2 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 27 Jun 2025 20:42:07 +0300 Subject: [PATCH] Sort imports --- python/sphinx/build.py | 1 + qt/aqt/import_export/importing.py | 3 +-- qt/aqt/reviewer.py | 4 +--- qt/aqt/utils.py | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/python/sphinx/build.py b/python/sphinx/build.py index 7d979c510..61091e6e1 100644 --- a/python/sphinx/build.py +++ b/python/sphinx/build.py @@ -2,6 +2,7 @@ # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import os import subprocess + os.environ["REPO_ROOT"] = os.path.abspath(".") subprocess.run(["out/pyenv/bin/sphinx-apidoc", "-o", "out/python/sphinx", "pylib", "qt"], check=True) subprocess.run(["out/pyenv/bin/sphinx-build", "out/python/sphinx", "out/python/sphinx/html"], check=True) diff --git a/qt/aqt/import_export/importing.py b/qt/aqt/import_export/importing.py index 938824035..cb27c5e4b 100644 --- a/qt/aqt/import_export/importing.py +++ b/qt/aqt/import_export/importing.py @@ -134,9 +134,8 @@ IMPORTERS: list[type[Importer]] = [ def legacy_file_endings(col: Collection) -> list[str]: - from anki.importing import AnkiPackageImporter + from anki.importing import AnkiPackageImporter, TextImporter, importers from anki.importing import MnemosyneImporter as LegacyMnemosyneImporter - from anki.importing import TextImporter, importers return [ ext diff --git a/qt/aqt/reviewer.py b/qt/aqt/reviewer.py index c35e9b1ca..a8839c598 100644 --- a/qt/aqt/reviewer.py +++ b/qt/aqt/reviewer.py @@ -21,13 +21,11 @@ from anki.scheduler.base import ScheduleCardsAsNew from anki.scheduler.v3 import ( CardAnswer, QueuedCards, -) -from anki.scheduler.v3 import Scheduler as V3Scheduler -from anki.scheduler.v3 import ( SchedulingContext, SchedulingStates, SetSchedulingStatesRequest, ) +from anki.scheduler.v3 import Scheduler as V3Scheduler from anki.tags import MARKED_TAG from anki.types import assert_exhaustive from anki.utils import is_mac diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index df7613ef9..f4425cee8 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -29,9 +29,9 @@ from anki.utils import ( version_with_build, ) from aqt.qt import * -from aqt.qt import QT_VERSION_STR # noqa: F401 from aqt.qt import ( PYQT_VERSION_STR, + QT_VERSION_STR, # noqa: F401 QAction, QApplication, QCheckBox,