Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Import from current directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dodaucy committed Nov 4, 2023
1 parent bb3d4f2 commit a4f90b4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import pymysql
from fastapi import Cookie, Depends, FastAPI, HTTPException, Response, status

import config
import models
import utils
from globals import db, login_rate_limit_handler, rate_limit_handler
from globals import settings as global_settings
from . import config
from . import models
from . import utils
from .globals import db, login_rate_limit_handler, rate_limit_handler
from .globals import settings as global_settings


app = FastAPI(openapi_url=None)
Expand Down
6 changes: 3 additions & 3 deletions src/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

from databases import Database

import config
from rate_limit import RateLimitHandler
from settings import Settings
from . import config
from .rate_limit import RateLimitHandler
from .settings import Settings


db = Database(config.DATABASE)
Expand Down
10 changes: 5 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
from fastapi_utils.tasks import repeat_every
from starlette.exceptions import HTTPException as StarletteHTTPException

import api
import config
import utils
from globals import db, rate_limit_handler
from globals import settings as global_settings
from . import api
from . import config
from . import utils
from .globals import db, rate_limit_handler
from .globals import settings as global_settings


app = FastAPI(openapi_url=None)
Expand Down
4 changes: 2 additions & 2 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

from databases import Database

import constants
import models
from . import constants
from . import models


class Settings():
Expand Down
4 changes: 2 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from fastapi import Cookie, HTTPException, status

import config
from globals import db
from . import config
from .globals import db


async def is_logged_in(token: str) -> bool:
Expand Down

0 comments on commit a4f90b4

Please sign in to comment.