mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 05:52:22 -04:00

* Add check:ruff build action * Add fix:ruff action * Add Ruff config Mostly generated by Cursor * Handle rest of lints * Fix formatting * Replace black and isort with ruff-format * Run ruff-format * Fix lint errors * Remove pylint disables * Remove .pylintrc * Update docs * Fix check:format not just checking * Fix isort rule being ignored * Sort imports * Ensure ./ninja format also handles import sorting * Remove unused isort cfg * Enable unsafe fixes in fix:ruff, and enable unused var warning * Re-run on config change; enable unnecessary ARG ignores * Use all pycodestyle errors, and add some more commented-out ones Latter logged on https://github.com/ankitects/anki/issues/4135
42 lines
935 B
Python
42 lines
935 B
Python
# Copyright: Ankitects Pty Ltd and contributors
|
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
from __future__ import annotations
|
|
|
|
# ruff: noqa: F401
|
|
import sys
|
|
|
|
import aqt
|
|
|
|
from .browser import Browser, PreviewDialog
|
|
|
|
# aliases for legacy pathnames
|
|
from .sidebar import (
|
|
SidebarItem,
|
|
SidebarItemType,
|
|
SidebarModel,
|
|
SidebarSearchBar,
|
|
SidebarStage,
|
|
SidebarTool,
|
|
SidebarToolbar,
|
|
SidebarTreeView,
|
|
)
|
|
from .table import (
|
|
CardState,
|
|
Cell,
|
|
CellRow,
|
|
Column,
|
|
Columns,
|
|
DataModel,
|
|
ItemId,
|
|
ItemList,
|
|
ItemState,
|
|
NoteState,
|
|
SearchContext,
|
|
StatusDelegate,
|
|
Table,
|
|
)
|
|
|
|
sys.modules["aqt.sidebar"] = sys.modules["aqt.browser.sidebar"]
|
|
aqt.sidebar = sys.modules["aqt.browser.sidebar"] # type: ignore
|
|
sys.modules["aqt.previewer"] = sys.modules["aqt.browser.previewer"]
|
|
aqt.previewer = sys.modules["aqt.browser.previewer"] # type: ignore
|