mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
Ensure ./ninja format also handles import sorting
This commit is contained in:
parent
013a46ad63
commit
979e55322f
3 changed files with 4 additions and 2 deletions
|
|
@ -197,7 +197,7 @@ struct PythonFormat<'a> {
|
|||
|
||||
impl BuildAction for PythonFormat<'_> {
|
||||
fn command(&self) -> &str {
|
||||
"$ruff format $mode $in"
|
||||
"$ruff format $mode $in && $ruff check --select I --fix $in"
|
||||
}
|
||||
|
||||
fn files(&mut self, build: &mut impl crate::build::FilesHandle) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ from threading import current_thread, main_thread
|
|||
from typing import TYPE_CHECKING, Any
|
||||
from weakref import ref
|
||||
|
||||
from markdown import markdown
|
||||
|
||||
import anki.buildinfo
|
||||
from anki import _rsbridge, backend_pb2, i18n_pb2
|
||||
from anki._backend_generated import RustBackendGenerated
|
||||
|
|
@ -18,7 +20,6 @@ from anki._fluent import GeneratedTranslations
|
|||
from anki.dbproxy import Row as DBRow
|
||||
from anki.dbproxy import ValueForDB
|
||||
from anki.utils import from_json_bytes, to_json_bytes
|
||||
from markdown import markdown
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from anki.collection import FsrsItem
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ from collections.abc import Callable
|
|||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
|
||||
from anki import hooks
|
||||
from anki.consts import *
|
||||
from anki.lang import without_unicode_isolation
|
||||
|
|
|
|||
Loading…
Reference in a new issue