core: cleanup/sort imports according to ruff check --select I
This commit is contained in:
parent
7023088d13
commit
7bfce72b7c
45 changed files with 235 additions and 170 deletions
|
@ -6,7 +6,7 @@ from contextlib import contextmanager
|
|||
from dataclasses import dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
from typing import Iterable, Sequence, Iterator
|
||||
from typing import Iterable, Iterator, Sequence
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
from contextlib import contextmanager
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
from typing import Iterator, Optional
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
V = 'HPI_TESTS_USES_OPTIONAL_DEPS'
|
||||
|
||||
# TODO use it for serialize tests that are using simplejson/orjson?
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
from datetime import datetime
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import NamedTuple, Iterator
|
||||
import warnings
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Iterator, NamedTuple
|
||||
|
||||
from ..denylist import DenyList
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from concurrent.futures import ProcessPoolExecutor
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import sqlite3
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
from ..sqlite import sqlite_connect_immutable, sqlite_copy_and_open
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
from pathlib import Path
|
||||
|
||||
from ..structure import match_structure
|
||||
|
||||
import pytest
|
||||
|
||||
from ..structure import match_structure
|
||||
|
||||
structure_data: Path = Path(__file__).parent / "structure_data"
|
||||
|
||||
|
|
|
@ -35,8 +35,7 @@ def test_cachew_dir_none() -> None:
|
|||
|
||||
settings.ENABLE = True # by default it's off in tests (see conftest.py)
|
||||
|
||||
from my.core.cachew import cache_dir
|
||||
from my.core.cachew import mcachew
|
||||
from my.core.cachew import cache_dir, mcachew
|
||||
from my.core.core_config import _reset_config as reset
|
||||
|
||||
with reset() as cc:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
from subprocess import check_call
|
||||
import sys
|
||||
from subprocess import check_call
|
||||
|
||||
|
||||
def test_lists_modules() -> None:
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import tempfile
|
||||
from typing import TYPE_CHECKING
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
|
||||
from ..common import get_files
|
||||
from ..kompress import CPath, ZipPath
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
# hack to replace all /tmp with 'real' tmp dir
|
||||
# not ideal, but makes tests more concise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue