python: Reorder imports with isort
Related to T2610
This commit is contained in:
parent
d24846a957
commit
22f7181294
69 changed files with 136 additions and 168 deletions
|
@ -4,10 +4,8 @@
|
|||
# See top-level LICENSE file for more information
|
||||
|
||||
import logging
|
||||
|
||||
from typing import Any, List, Mapping
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
@ -28,9 +26,10 @@ def debian_init(
|
|||
components: Default components to register per suite
|
||||
|
||||
"""
|
||||
from swh.lister.debian.models import Distribution, Area
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from swh.lister.debian.models import Area, Distribution
|
||||
|
||||
db_session = sessionmaker(bind=db_engine)()
|
||||
distrib = (
|
||||
db_session.query(Distribution)
|
||||
|
|
|
@ -7,15 +7,17 @@ import bz2
|
|||
from collections import defaultdict
|
||||
import datetime
|
||||
import gzip
|
||||
import lzma
|
||||
import logging
|
||||
import lzma
|
||||
from typing import Any, Dict, Mapping, Optional
|
||||
|
||||
from debian.deb822 import Sources
|
||||
from requests import Response
|
||||
from sqlalchemy.orm import joinedload, load_only
|
||||
from sqlalchemy.schema import CreateTable, DropTable
|
||||
from typing import Mapping, Optional, Dict, Any
|
||||
from requests import Response
|
||||
|
||||
from swh.lister.core.lister_base import FetchError, ListerBase
|
||||
from swh.lister.core.lister_transports import ListerHttpTransport
|
||||
from swh.lister.debian.models import (
|
||||
AreaSnapshot,
|
||||
Distribution,
|
||||
|
@ -24,9 +26,6 @@ from swh.lister.debian.models import (
|
|||
TempPackage,
|
||||
)
|
||||
|
||||
from swh.lister.core.lister_base import ListerBase, FetchError
|
||||
from swh.lister.core.lister_transports import ListerHttpTransport
|
||||
|
||||
decompressors = {
|
||||
"gz": lambda f: gzip.GzipFile(fileobj=f),
|
||||
"bz2": bz2.BZ2File,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import binascii
|
||||
from collections import defaultdict
|
||||
import datetime
|
||||
from typing import Any, Mapping
|
||||
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
|
@ -19,7 +20,6 @@ from sqlalchemy import (
|
|||
Table,
|
||||
UniqueConstraint,
|
||||
)
|
||||
from typing import Any, Mapping
|
||||
|
||||
try:
|
||||
from sqlalchemy import JSON
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
# See top-level LICENSE file for more information
|
||||
|
||||
import pytest
|
||||
|
||||
from pytest_postgresql.janitor import DatabaseJanitor
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
import pytest
|
||||
|
||||
from swh.lister.debian import debian_init
|
||||
|
||||
from swh.lister.debian.models import Distribution, Area
|
||||
from swh.lister.debian.models import Area, Distribution
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import logging
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import pytest
|
||||
|
||||
from swh.lister.debian.models import Distribution, Area
|
||||
from swh.lister.debian.models import Area, Distribution
|
||||
|
||||
|
||||
def test_area_index_uris_deb(session):
|
||||
|
|
|
@ -6,8 +6,8 @@ import logging
|
|||
|
||||
import click
|
||||
|
||||
from swh.lister.debian.models import Distribution, Area, SQLBase
|
||||
from swh.lister.debian.lister import DebianLister
|
||||
from swh.lister.debian.models import Area, Distribution, SQLBase
|
||||
|
||||
|
||||
@click.group()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue