core, CLI (base), tools (common/data_format): typing/core readability
This commit is contained in:
parent
84e6d9ceb2
commit
a74f9327f2
1 changed files with 37 additions and 29 deletions
|
|
@ -16,61 +16,67 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import time
|
||||
import asyncio
|
||||
from asyncio.subprocess import PIPE
|
||||
import copy
|
||||
from datetime import datetime
|
||||
from asyncio.subprocess import PIPE
|
||||
from pathlib import Path
|
||||
from typing import Union, Dict, List, Tuple, Iterable, Any, Callable, Optional
|
||||
from sqlalchemy.ext.asyncio import AsyncSession, AsyncEngine, create_async_engine
|
||||
from sqlalchemy.exc import IntegrityError, NoResultFound
|
||||
from sqlalchemy.orm import (
|
||||
sessionmaker, subqueryload, joinedload, selectinload, contains_eager
|
||||
)
|
||||
from sqlalchemy.orm.decl_api import DeclarativeMeta
|
||||
from sqlalchemy.orm.attributes import Mapped
|
||||
from sqlalchemy.future import select
|
||||
from sqlalchemy.engine import Engine, Connection
|
||||
from sqlalchemy import update, delete, and_, or_, event, func
|
||||
from sqlalchemy.sql.functions import coalesce, sum as sum_, now, count
|
||||
from sqlalchemy.dialects.sqlite import insert
|
||||
from sqlalchemy import text, literal_column, Integer
|
||||
from alembic import script as al_script, config as al_config
|
||||
import sys
|
||||
import time
|
||||
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
|
||||
|
||||
from alembic import config as al_config, script as al_script
|
||||
from alembic.runtime import migration as al_migration
|
||||
from sqlalchemy import and_, delete, event, func, or_, update
|
||||
from sqlalchemy import Integer, literal_column, text
|
||||
from sqlalchemy.dialects.sqlite import insert
|
||||
from sqlalchemy.engine import Connection, Engine
|
||||
from sqlalchemy.exc import IntegrityError, NoResultFound
|
||||
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, create_async_engine
|
||||
from sqlalchemy.future import select
|
||||
from sqlalchemy.orm import (
|
||||
contains_eager,
|
||||
joinedload,
|
||||
selectinload,
|
||||
sessionmaker,
|
||||
subqueryload,
|
||||
)
|
||||
from sqlalchemy.orm.attributes import Mapped
|
||||
from sqlalchemy.orm.decl_api import DeclarativeMeta
|
||||
from sqlalchemy.sql.functions import coalesce, count, now, sum as sum_
|
||||
from twisted.internet import defer
|
||||
from twisted.words.protocols.jabber import jid
|
||||
from twisted.words.xish import domish
|
||||
from sat.core.i18n import _
|
||||
|
||||
from sat.core import exceptions
|
||||
from sat.core.log import getLogger
|
||||
from sat.core.constants import Const as C
|
||||
from sat.core.core_types import SatXMPPEntity
|
||||
from sat.tools.utils import aio, as_future
|
||||
from sat.tools.common import uri
|
||||
from sat.core.i18n import _
|
||||
from sat.core.log import getLogger
|
||||
from sat.memory import migration
|
||||
from sat.memory import sqla_config
|
||||
from sat.memory.sqla_mapping import (
|
||||
NOT_IN_EXTRA,
|
||||
SyncState,
|
||||
Base,
|
||||
Profile,
|
||||
Component,
|
||||
File,
|
||||
History,
|
||||
Message,
|
||||
Subject,
|
||||
Thread,
|
||||
NOT_IN_EXTRA,
|
||||
ParamGen,
|
||||
ParamInd,
|
||||
PrivateGen,
|
||||
PrivateInd,
|
||||
PrivateGenBin,
|
||||
PrivateInd,
|
||||
PrivateIndBin,
|
||||
File,
|
||||
PubsubNode,
|
||||
Profile,
|
||||
PubsubItem,
|
||||
PubsubNode,
|
||||
Subject,
|
||||
SyncState,
|
||||
Thread,
|
||||
)
|
||||
from sat.tools.common import uri
|
||||
from sat.tools.utils import aio, as_future
|
||||
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue