Skip to content

Commit

Permalink
refactor: move AppState into types (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Nov 7, 2024
1 parent 6f08811 commit 891782e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
*.tar.gz
.env
cache/
.vscode/
2 changes: 1 addition & 1 deletion server/api/v4/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from litestar.params import Parameter

from server.schemas.v1 import Language
from server.state import AppState
from server.types import AppState


@get('/language', sync_to_thread=False, cache=True)
Expand Down
3 changes: 1 addition & 2 deletions server/api/v4/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from litestar.status_codes import HTTP_200_OK

from server.schemas.v1 import Translated, Translation
from server.state import AppState
from server.types import Languages
from server.types import AppState, Languages


class TranslatorController(Controller):
Expand Down
1 change: 1 addition & 0 deletions server/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from server.types.compute_types import ComputeTypes as ComputeTypes
from server.types.devices import Devices as Devices
from server.types.languages import Languages as Languages
from server.types.state import AppState as AppState
File renamed without changes.

0 comments on commit 891782e

Please sign in to comment.