Skip to content

Commit

Permalink
move init imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kheina committed Aug 7, 2024
1 parent a04ff1b commit 477f766
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions emojis/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async def create(self: Self, user: KhUser, req: CreateRequest) -> Emoji :
emoji = req.emoji,
owner = await users._handle_to_user_id(req.owner) if req.owner else None,
post_id = req.post_id.int() if req.post_id else None,
alt = req.alt,
filename = req.filename,
)
await super().create(iemoji)
Expand Down
6 changes: 3 additions & 3 deletions init.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
from fontTools.ttLib import TTFont

from authenticator.models import LoginRequest
from emojis.models import InternalEmoji
from emojis.repository import EmojiRepository
from shared.base64 import b64encode
from shared.caching.key_value_store import KeyValueStore
from shared.config.credentials import decryptCredentialFile, fetch
from shared.sql import SqlInterface
from fontTools.ttLib.tables.sbixStrike import Strike


Expand Down Expand Up @@ -68,6 +65,7 @@ def execSql(unlock: bool = False, file: str = '') -> None :
folders under db are sorted numberically and run in descending order
files within those folders are treated the same.
"""
from shared.sql import SqlInterface

nukeCache()

Expand Down Expand Up @@ -124,6 +122,8 @@ def execSql(unlock: bool = False, file: str = '') -> None :
@cli.command('emojis')
async def uploadEmojis() -> None :
from shared.backblaze import B2Interface
from emojis.models import InternalEmoji
from emojis.repository import EmojiRepository

click.echo('checking for map file...')
map_file = 'images/emoji_map.json'
Expand Down
2 changes: 1 addition & 1 deletion requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
isort>=5.8.0
pytest>=8.2.2
fonttools>=4.53.1
cairosv>=2.7.1
asyncclick>=8.1.7.2
pillow>=10.4.0

0 comments on commit 477f766

Please sign in to comment.