diff --git a/docs/conf.py b/docs/conf.py index 5bc74c6..95188e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,7 +7,7 @@ from sqlalchemy.exc import SAWarning -from __metadata__ import __project__ +from src.__metadata__ import __project__ # -- Environmental Data ------------------------------------------------------ warnings.filterwarnings("ignore", category=SAWarning) diff --git a/src/__init__.py b/src/__init__.py index f9b6856..eb356fc 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -4,7 +4,7 @@ from rich import get_console from rich.traceback import install as rich_tracebacks -from __metadata__ import __version__ +from src.__metadata__ import __version__ from src import app, byte, cli, server, utils __all__ = ( diff --git a/src/app.py b/src/app.py index cc26edd..8486b3d 100644 --- a/src/app.py +++ b/src/app.py @@ -19,8 +19,8 @@ def create_app() -> Litestar: from litestar import Litestar from pydantic import SecretStr - from server import domain - from server.lib import ( + from src.server import domain + from src.server.lib import ( cors, db, exceptions, @@ -30,7 +30,7 @@ def create_app() -> Litestar: static_files, template, ) - from server.lib.dependencies import create_collection_dependencies + from src.server.lib.dependencies import create_collection_dependencies dependencies = create_collection_dependencies() diff --git a/src/byte/__init__.py b/src/byte/__init__.py index fe48f1b..61056b2 100644 --- a/src/byte/__init__.py +++ b/src/byte/__init__.py @@ -1,8 +1,8 @@ """Byte Bot Bot.""" from __future__ import annotations -from byte import bot, lib -from byte.lib.log import setup_logging +from src.byte import bot, lib +from src.byte.lib.log import setup_logging __all__ = ["bot", "lib"] diff --git a/src/byte/bot.py b/src/byte/bot.py index 8d26113..84dc56f 100644 --- a/src/byte/bot.py +++ b/src/byte/bot.py @@ -10,8 +10,8 @@ from discord.ext.commands import Bot, CommandError, Context, ExtensionAlreadyLoaded from dotenv import load_dotenv -from byte.lib import settings -from byte.lib.log import get_logger +from src.byte.lib import settings +from src.byte.lib.log import get_logger __all__ = [ "Byte", diff --git a/src/byte/lib/__init__.py b/src/byte/lib/__init__.py index 28cfd13..7c606ae 100644 --- a/src/byte/lib/__init__.py +++ b/src/byte/lib/__init__.py @@ -1,6 +1,6 @@ """Byte library module.""" -from byte.lib import common, log, settings, utils +from src.byte.lib import common, log, settings, utils __all__ = [ "settings", diff --git a/src/byte/lib/common/__init__.py b/src/byte/lib/common/__init__.py index 5a7f255..a320a81 100644 --- a/src/byte/lib/common/__init__.py +++ b/src/byte/lib/common/__init__.py @@ -3,7 +3,7 @@ .. todo:: temporary, these are not multi-guild friendly. """ -from byte.lib.common import assets, colors, guilds, links +from src.byte.lib.common import assets, colors, guilds, links __all__ = ( "assets", diff --git a/src/byte/lib/log.py b/src/byte/lib/log.py index b42849e..32a2d60 100644 --- a/src/byte/lib/log.py +++ b/src/byte/lib/log.py @@ -9,7 +9,7 @@ from rich.logging import RichHandler # noqa: F401 from rich.traceback import install -from byte.lib import settings +from src.byte.lib import settings __all__ = [ "setup_logging", diff --git a/src/byte/lib/settings.py b/src/byte/lib/settings.py index 6c50c5b..60561bc 100644 --- a/src/byte/lib/settings.py +++ b/src/byte/lib/settings.py @@ -9,8 +9,8 @@ from pydantic import ValidationError, field_validator from pydantic_settings import BaseSettings, SettingsConfigDict -import utils -from __metadata__ import __version__ as version +from src import utils +from src.__metadata__ import __version__ as version __all__ = [ "discord", @@ -25,7 +25,7 @@ DEFAULT_MODULE_NAME: str = "src" BASE_DIR: Final = utils.module_to_os_path(DEFAULT_MODULE_NAME) -PLUGINS_DIR: Final = utils.module_to_os_path("byte.plugins") +PLUGINS_DIR: Final = utils.module_to_os_path("src.byte.plugins") class DiscordSettings(BaseSettings): diff --git a/src/byte/lib/utils.py b/src/byte/lib/utils.py index 777664e..80a45c8 100644 --- a/src/byte/lib/utils.py +++ b/src/byte/lib/utils.py @@ -14,8 +14,8 @@ from discord.ext import commands from ruff.__main__ import find_ruff_bin # type: ignore[import-untyped] -from byte.lib import settings -from byte.lib.common.links import pastebin +from src.byte.lib import settings +from src.byte.lib.common.links import pastebin if TYPE_CHECKING: from collections.abc import Iterable diff --git a/src/byte/plugins/__init__.py b/src/byte/plugins/__init__.py index c0b33f0..fb9bb66 100644 --- a/src/byte/plugins/__init__.py +++ b/src/byte/plugins/__init__.py @@ -1,6 +1,6 @@ """Pluggable modules for Byte.""" -from byte.plugins import admin, custom, events, forums, general, testing +from src.byte.plugins import admin, custom, events, forums, general, testing __all__ = [ "custom", diff --git a/src/byte/plugins/admin.py b/src/byte/plugins/admin.py index ac80a6a..8c33ca5 100644 --- a/src/byte/plugins/admin.py +++ b/src/byte/plugins/admin.py @@ -7,7 +7,7 @@ from discord.ext import commands from discord.ext.commands import Bot, Cog, Context, command, group, is_owner -from byte.lib.utils import is_byte_dev +from src.byte.lib.utils import is_byte_dev __all__ = ("AdminCommands", "setup") diff --git a/src/byte/plugins/astral.py b/src/byte/plugins/astral.py index 5fb9f1e..5dd94a7 100644 --- a/src/byte/plugins/astral.py +++ b/src/byte/plugins/astral.py @@ -8,13 +8,13 @@ from discord.app_commands import command as app_command from discord.ext.commands import Bot, Cog -from byte.lib.common.assets import ruff_logo -from byte.lib.common.colors import astral_purple, astral_yellow -from byte.lib.utils import chunk_sequence, format_ruff_rule, query_all_ruff_rules -from byte.views.astral import RuffView +from src.byte.lib.common.assets import ruff_logo +from src.byte.lib.common.colors import astral_purple, astral_yellow +from src.byte.lib.utils import chunk_sequence, format_ruff_rule, query_all_ruff_rules +from src.byte.views.astral import RuffView if TYPE_CHECKING: - from byte.lib.utils import RuffRule + from src.byte.lib.utils import RuffRule __all__ = ("Astral", "setup") diff --git a/src/byte/plugins/custom/__init__.py b/src/byte/plugins/custom/__init__.py index a28a499..0e9978a 100644 --- a/src/byte/plugins/custom/__init__.py +++ b/src/byte/plugins/custom/__init__.py @@ -1,6 +1,6 @@ """Custom Pluggable modules for Byte.""" -from byte.plugins.custom import litestar +from src.byte.plugins.custom import litestar __all__ = [ "litestar", diff --git a/src/byte/plugins/custom/litestar.py b/src/byte/plugins/custom/litestar.py index 813b76b..916a218 100644 --- a/src/byte/plugins/custom/litestar.py +++ b/src/byte/plugins/custom/litestar.py @@ -9,8 +9,8 @@ from discord.utils import MISSING from httpx import codes -from byte.lib.utils import is_byte_dev, mention_role, mention_user -from server.domain.github.helpers import github_client +from src.byte.lib.utils import is_byte_dev, mention_role, mention_user +from src.server.domain.github.helpers import github_client __all__ = ("LitestarCommands", "setup") diff --git a/src/byte/plugins/events.py b/src/byte/plugins/events.py index 2a5c366..6b800b2 100644 --- a/src/byte/plugins/events.py +++ b/src/byte/plugins/events.py @@ -5,10 +5,10 @@ from discord import Embed from discord.ext.commands import Bot, Cog -from byte.lib.common.assets import litestar_logo_yellow -from byte.lib.common.links import mcve -from byte.lib.utils import linker -from byte.views.forums import HelpThreadView +from src.byte.lib.common.assets import litestar_logo_yellow +from src.byte.lib.common.links import mcve +from src.byte.lib.utils import linker +from src.byte.views.forums import HelpThreadView __all__ = ("Events", "setup") diff --git a/src/byte/plugins/forums.py b/src/byte/plugins/forums.py index f49562f..544ffb4 100644 --- a/src/byte/plugins/forums.py +++ b/src/byte/plugins/forums.py @@ -5,9 +5,9 @@ from discord.app_commands import command as app_command from discord.ext.commands import Bot, Cog, Context, command, hybrid_command -from byte.lib.common.assets import litestar_logo_yellow -from byte.lib.common.links import mcve -from byte.lib.utils import linker +from src.byte.lib.common.assets import litestar_logo_yellow +from src.byte.lib.common.links import mcve +from src.byte.lib.utils import linker __all__ = ("ForumCommands", "setup") diff --git a/src/byte/plugins/general.py b/src/byte/plugins/general.py index c034d71..979eefa 100644 --- a/src/byte/plugins/general.py +++ b/src/byte/plugins/general.py @@ -5,9 +5,9 @@ from discord.app_commands import command as app_command from discord.ext.commands import Bot, Cog -from byte.lib.common.assets import litestar_logo_yellow -from byte.lib.common.links import markdown_guide, pastebin -from byte.lib.utils import linker +from src.byte.lib.common.assets import litestar_logo_yellow +from src.byte.lib.common.links import markdown_guide, pastebin +from src.byte.lib.utils import linker __all__ = ("GeneralCommands", "setup") diff --git a/src/byte/plugins/python.py b/src/byte/plugins/python.py index 6b5f54f..e3c126f 100644 --- a/src/byte/plugins/python.py +++ b/src/byte/plugins/python.py @@ -6,11 +6,11 @@ from discord.app_commands import command as app_command from discord.ext.commands import Bot, Cog -from byte.lib.common.assets import python_logo -from byte.lib.common.colors import python_blue, python_yellow -from byte.lib.utils import PEP, query_all_peps -from byte.views.embed import ExtendedEmbed, Field -from byte.views.python import PEPView +from src.byte.lib.common.assets import python_logo +from src.byte.lib.common.colors import python_blue, python_yellow +from src.byte.lib.utils import PEP, query_all_peps +from src.byte.views.embed import ExtendedEmbed, Field +from src.byte.views.python import PEPView __all__ = ("Python", "setup") diff --git a/src/byte/views/__init__.py b/src/byte/views/__init__.py index 43a0e86..95018e0 100644 --- a/src/byte/views/__init__.py +++ b/src/byte/views/__init__.py @@ -1,6 +1,6 @@ """Views for the bot.""" -from byte.views import forums +from src.byte.views import forums __all__ = [ "forums", diff --git a/src/byte/views/astral.py b/src/byte/views/astral.py index bc4c85f..6c0e733 100644 --- a/src/byte/views/astral.py +++ b/src/byte/views/astral.py @@ -1,8 +1,8 @@ """Discord UI views used in Astral commands.""" from __future__ import annotations -from byte.lib.log import get_logger -from byte.views.abstract_views import BaseEmbedView +from src.byte.lib.log import get_logger +from src.byte.views.abstract_views import BaseEmbedView __all__ = ("RuffView",) diff --git a/src/byte/views/forums.py b/src/byte/views/forums.py index 935db0e..75a116c 100644 --- a/src/byte/views/forums.py +++ b/src/byte/views/forums.py @@ -4,8 +4,8 @@ from discord.ext.commands import Bot from discord.ui import Button, View, button -from byte.lib.common.links import litestar_issues -from byte.lib.log import get_logger +from src.byte.lib.common.links import litestar_issues +from src.byte.lib.log import get_logger __all__ = ("HelpThreadView",) diff --git a/src/byte/views/python.py b/src/byte/views/python.py index 9f44916..8f66804 100644 --- a/src/byte/views/python.py +++ b/src/byte/views/python.py @@ -1,8 +1,8 @@ """Discord UI views used in Python commands.""" from __future__ import annotations -from byte.lib.log import get_logger -from byte.views.abstract_views import BaseEmbedView +from src.byte.lib.log import get_logger +from src.byte.views.abstract_views import BaseEmbedView __all__ = ("PEPView",) diff --git a/src/cli.py b/src/cli.py index 3792729..e63570c 100644 --- a/src/cli.py +++ b/src/cli.py @@ -9,7 +9,7 @@ import click from rich import get_console -from server.lib import log, settings +from src.server.lib import log, settings __all__ = [ "run_bot", diff --git a/src/server/__init__.py b/src/server/__init__.py index e2374c1..a007669 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -1,7 +1,7 @@ """Byte Bot Server.""" from __future__ import annotations -from server import domain, lib +from src.server import domain, lib __all__ = ( "domain", diff --git a/src/server/domain/__init__.py b/src/server/domain/__init__.py index e770574..42fe9ef 100644 --- a/src/server/domain/__init__.py +++ b/src/server/domain/__init__.py @@ -6,7 +6,7 @@ from litestar.contrib.repository.filters import FilterTypes from litestar.pagination import OffsetPagination -from server.domain import db, guilds, system, urls, web +from src.server.domain import db, guilds, system, urls, web if TYPE_CHECKING: from collections.abc import Mapping diff --git a/src/server/domain/db/__init__.py b/src/server/domain/db/__init__.py index ea8a50c..7b570cc 100644 --- a/src/server/domain/db/__init__.py +++ b/src/server/domain/db/__init__.py @@ -1,4 +1,4 @@ """Domain for database models.""" -from server.domain.db import models +from src.server.domain.db import models __all__ = ["models"] diff --git a/src/server/domain/github/__init__.py b/src/server/domain/github/__init__.py index 9279957..0ab3e47 100644 --- a/src/server/domain/github/__init__.py +++ b/src/server/domain/github/__init__.py @@ -1,5 +1,5 @@ """GitHub domain.""" -from server.domain.github import helpers +from src.server.domain.github import helpers __all__ = ("helpers",) diff --git a/src/server/domain/github/helpers.py b/src/server/domain/github/helpers.py index edf4bcc..4531cda 100644 --- a/src/server/domain/github/helpers.py +++ b/src/server/domain/github/helpers.py @@ -3,7 +3,7 @@ from githubkit import AppInstallationAuthStrategy, GitHub # type: ignore[reportMissingImports] -from server.lib import settings +from src.server.lib import settings __all__ = ("github_client",) diff --git a/src/server/domain/guilds/__init__.py b/src/server/domain/guilds/__init__.py index d1f5148..3133035 100644 --- a/src/server/domain/guilds/__init__.py +++ b/src/server/domain/guilds/__init__.py @@ -1,5 +1,5 @@ """Guilds domain.""" -from server.domain.guilds import controllers +from src.server.domain.guilds import controllers __all__ = ("controllers",) diff --git a/src/server/domain/guilds/controllers.py b/src/server/domain/guilds/controllers.py index 0d03b32..267a64c 100644 --- a/src/server/domain/guilds/controllers.py +++ b/src/server/domain/guilds/controllers.py @@ -7,10 +7,10 @@ from litestar.di import Provide from litestar.params import Dependency, Parameter -from server.domain import urls -from server.domain.guilds.dependencies import provides_guilds_service -from server.domain.guilds.schemas import GuildSchema -from server.domain.guilds.services import GuildsService # noqa: TCH001 +from src.server.domain import urls +from src.server.domain.guilds.dependencies import provides_guilds_service +from src.server.domain.guilds.schemas import GuildSchema +from src.server.domain.guilds.services import GuildsService # noqa: TCH001 if TYPE_CHECKING: from advanced_alchemy.filters import FilterTypes diff --git a/src/server/domain/guilds/dependencies.py b/src/server/domain/guilds/dependencies.py index 77cc803..af9c199 100644 --- a/src/server/domain/guilds/dependencies.py +++ b/src/server/domain/guilds/dependencies.py @@ -5,9 +5,9 @@ from sqlalchemy import select -from server.domain.db.models import Guild -from server.domain.guilds.services import GuildsService -from server.lib import log +from src.server.domain.db.models import Guild +from src.server.domain.guilds.services import GuildsService +from src.server.lib import log if TYPE_CHECKING: from collections.abc import AsyncGenerator diff --git a/src/server/domain/guilds/schemas.py b/src/server/domain/guilds/schemas.py index 5cf11a3..82f1e25 100644 --- a/src/server/domain/guilds/schemas.py +++ b/src/server/domain/guilds/schemas.py @@ -5,7 +5,7 @@ from pydantic import Field -from server.lib.schema import CamelizedBaseModel +from src.server.lib.schema import CamelizedBaseModel __all__ = ("GuildCreate", "GuildSchema", "GuildUpdate") diff --git a/src/server/domain/guilds/services.py b/src/server/domain/guilds/services.py index 1f7ee0f..9ba2a1c 100644 --- a/src/server/domain/guilds/services.py +++ b/src/server/domain/guilds/services.py @@ -3,10 +3,10 @@ from typing import Any -from server.domain.db.models import Guild -from server.lib import log -from server.lib.repository import SQLAlchemyAsyncSlugRepository -from server.lib.service import SQLAlchemyAsyncRepositoryService +from src.server.domain.db.models import Guild +from src.server.lib import log +from src.server.lib.repository import SQLAlchemyAsyncSlugRepository +from src.server.lib.service import SQLAlchemyAsyncRepositoryService __all__ = ("GuildsRepository", "GuildsService") diff --git a/src/server/domain/system/__init__.py b/src/server/domain/system/__init__.py index 4f38094..76b4030 100644 --- a/src/server/domain/system/__init__.py +++ b/src/server/domain/system/__init__.py @@ -1,7 +1,7 @@ """System domain.""" from __future__ import annotations -from server.domain.system import controllers +from src.server.domain.system import controllers __all__ = [ "controllers", diff --git a/src/server/domain/system/controllers/__init__.py b/src/server/domain/system/controllers/__init__.py index dc0d429..1ac893c 100644 --- a/src/server/domain/system/controllers/__init__.py +++ b/src/server/domain/system/controllers/__init__.py @@ -1,7 +1,7 @@ """System domain controllers.""" from __future__ import annotations -from server.domain.system.controllers import system +from src.server.domain.system.controllers import system __all__ = [ "system", diff --git a/src/server/domain/web/__init__.py b/src/server/domain/web/__init__.py index 7720fb5..f6af774 100644 --- a/src/server/domain/web/__init__.py +++ b/src/server/domain/web/__init__.py @@ -1,7 +1,7 @@ """Web domain.""" from __future__ import annotations -from server.domain.web import controllers +from src.server.domain.web import controllers __all__ = [ "controllers", diff --git a/src/server/domain/web/controllers/__init__.py b/src/server/domain/web/controllers/__init__.py index 378db02..13ec7e2 100644 --- a/src/server/domain/web/controllers/__init__.py +++ b/src/server/domain/web/controllers/__init__.py @@ -1,7 +1,7 @@ """Web domain controllers.""" from __future__ import annotations -from server.domain.web.controllers import web +from src.server.domain.web.controllers import web __all__ = [ "web", diff --git a/src/server/domain/web/controllers/web.py b/src/server/domain/web/controllers/web.py index 5771fa7..85a3b55 100644 --- a/src/server/domain/web/controllers/web.py +++ b/src/server/domain/web/controllers/web.py @@ -5,7 +5,7 @@ from litestar.response import Template from litestar.status_codes import HTTP_200_OK -from server.domain import urls +from src.server.domain import urls __all__ = ["WebController"] diff --git a/src/server/lib/__init__.py b/src/server/lib/__init__.py index 8ca4431..1d38805 100644 --- a/src/server/lib/__init__.py +++ b/src/server/lib/__init__.py @@ -1,7 +1,7 @@ """Server Lib.""" from __future__ import annotations -from server.lib import ( +from src.server.lib import ( cors, db, dependencies, diff --git a/src/server/lib/cors.py b/src/server/lib/cors.py index 02441eb..e00408d 100644 --- a/src/server/lib/cors.py +++ b/src/server/lib/cors.py @@ -1,7 +1,7 @@ """CORS config.""" from litestar.config.cors import CORSConfig -from server.lib import settings +from src.server.lib import settings config = CORSConfig(allow_origins=settings.project.BACKEND_CORS_ORIGINS) """Default CORS config.""" diff --git a/src/server/lib/db/__init__.py b/src/server/lib/db/__init__.py index 057fc56..7718add 100644 --- a/src/server/lib/db/__init__.py +++ b/src/server/lib/db/__init__.py @@ -1,8 +1,8 @@ """Core DB Package.""" from __future__ import annotations -from server.lib.db import orm -from server.lib.db.base import ( +from src.server.lib.db import orm +from src.server.lib.db.base import ( async_session_factory, config, engine, diff --git a/src/server/lib/db/base.py b/src/server/lib/db/base.py index 7b87265..43ad591 100644 --- a/src/server/lib/db/base.py +++ b/src/server/lib/db/base.py @@ -12,7 +12,7 @@ from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine from sqlalchemy.pool import NullPool -from server.lib import constants, serialization, settings +from src.server.lib import constants, serialization, settings __all__ = ["session", "engine", "async_session_factory", "config", "plugin"] diff --git a/src/server/lib/dependencies.py b/src/server/lib/dependencies.py index 4659445..d03c84c 100644 --- a/src/server/lib/dependencies.py +++ b/src/server/lib/dependencies.py @@ -16,7 +16,7 @@ from litestar.di import Provide from litestar.params import Dependency, Parameter -from server.lib import constants +from src.server.lib import constants __all__ = [ "create_collection_dependencies", diff --git a/src/server/lib/log/__init__.py b/src/server/lib/log/__init__.py index d97bc74..921c4db 100644 --- a/src/server/lib/log/__init__.py +++ b/src/server/lib/log/__init__.py @@ -9,9 +9,9 @@ import structlog from litestar.logging.config import LoggingConfig -from server.lib import settings -from server.lib.log import controller -from server.lib.log.utils import EventFilter, msgspec_json_renderer +from src.server.lib import settings +from src.server.lib.log import controller +from src.server.lib.log.utils import EventFilter, msgspec_json_renderer if TYPE_CHECKING: from collections.abc import Sequence diff --git a/src/server/lib/log/controller.py b/src/server/lib/log/controller.py index 6e64f50..18cd76f 100644 --- a/src/server/lib/log/controller.py +++ b/src/server/lib/log/controller.py @@ -22,7 +22,7 @@ ) from litestar.utils.scope import get_litestar_scope_state -from server.lib import settings +from src.server.lib import settings __all__ = ["BeforeSendHandler", "drop_health_logs", "middleware_factory"] diff --git a/src/server/lib/log/utils.py b/src/server/lib/log/utils.py index 7e9a4dc..72efbaf 100644 --- a/src/server/lib/log/utils.py +++ b/src/server/lib/log/utils.py @@ -13,7 +13,7 @@ __all__ = ["EventFilter", "msgspec_json_renderer"] -from server.lib import serialization +from src.server.lib import serialization if TYPE_CHECKING: from collections.abc import Iterable diff --git a/src/server/lib/openapi.py b/src/server/lib/openapi.py index 7f97d5d..eea90a0 100644 --- a/src/server/lib/openapi.py +++ b/src/server/lib/openapi.py @@ -4,7 +4,7 @@ from litestar.openapi.config import OpenAPIConfig from litestar.openapi.spec import Contact -from server.lib import settings +from src.server.lib import settings __all__ = ("config",) diff --git a/src/server/lib/repository.py b/src/server/lib/repository.py index 308595e..67f2961 100644 --- a/src/server/lib/repository.py +++ b/src/server/lib/repository.py @@ -9,7 +9,7 @@ from advanced_alchemy.repository.typing import ModelT from litestar.repository.handlers import on_app_init as _on_app_init -from utils import slugify +from src.utils import slugify if TYPE_CHECKING: from litestar.config.app import AppConfig diff --git a/src/server/lib/schema.py b/src/server/lib/schema.py index 6855eb8..27bdc62 100644 --- a/src/server/lib/schema.py +++ b/src/server/lib/schema.py @@ -4,7 +4,7 @@ from pydantic import BaseModel as _BaseModel from pydantic import ConfigDict -from utils import camel_case +from src.utils import camel_case __all__ = ["BaseModel", "CamelizedBaseModel"] diff --git a/src/server/lib/service.py b/src/server/lib/service.py index bf9f5c6..3a15c06 100644 --- a/src/server/lib/service.py +++ b/src/server/lib/service.py @@ -18,7 +18,7 @@ from litestar.pagination import OffsetPagination from pydantic.type_adapter import TypeAdapter -from server.lib.db import async_session_factory +from src.server.lib.db import async_session_factory if TYPE_CHECKING: from collections.abc import AsyncIterator @@ -27,7 +27,7 @@ from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.sql import ColumnElement - from server.lib.types import ModelDTOT, SQLAlchemyAsyncRepoServiceT + from src.server.lib.types import ModelDTOT, SQLAlchemyAsyncRepoServiceT __all__ = ["SQLAlchemyAsyncRepositoryService"] diff --git a/src/server/lib/settings.py b/src/server/lib/settings.py index 8515a32..6ab1fc0 100644 --- a/src/server/lib/settings.py +++ b/src/server/lib/settings.py @@ -15,8 +15,8 @@ from pydantic.types import SecretBytes from pydantic_settings import BaseSettings, SettingsConfigDict -import utils -from __metadata__ import __version__ as version +from src import utils +from src.__metadata__ import __version__ as version __all__ = ( "APISettings", diff --git a/src/server/lib/static_files.py b/src/server/lib/static_files.py index 524bb4b..d15b765 100644 --- a/src/server/lib/static_files.py +++ b/src/server/lib/static_files.py @@ -5,7 +5,7 @@ from litestar.static_files.config import StaticFilesConfig -from server.lib import settings +from src.server.lib import settings STATIC_DIRS = [settings.project.STATIC_DIR] if settings.project.DEBUG: diff --git a/src/server/lib/template.py b/src/server/lib/template.py index f623233..7fd22fb 100644 --- a/src/server/lib/template.py +++ b/src/server/lib/template.py @@ -6,7 +6,7 @@ from litestar.template.config import TemplateConfig -from server.lib import settings +from src.server.lib import settings config = TemplateConfig( directory=settings.TEMPLATES_DIR, diff --git a/src/server/lib/types.py b/src/server/lib/types.py index d696d6d..b2426cf 100644 --- a/src/server/lib/types.py +++ b/src/server/lib/types.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from pydantic import BaseModel - from server.lib.service import SQLAlchemyAsyncRepositoryService + from src.server.lib.service import SQLAlchemyAsyncRepositoryService # -- Database Types SQLAlchemyModelT = TypeVar("SQLAlchemyModelT", bound=DeclarativeBase)