Skip to content

Commit

Permalink
chore: add celery types
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed Apr 3, 2024
1 parent 54efb67 commit 9402aca
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 3 deletions.
78 changes: 76 additions & 2 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Topvennie <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
python = "^3.11.4"
django = "^5.0.3"
django-sslserver = "^0.22"
djangorestframework = "^3.15.1"
Expand All @@ -20,6 +20,8 @@ celery = {extras = ["redis"], version = "^5.3.6"}
django-redis = "^5.4.0"
gunicorn = "^21.2.0"
whitenoise = "^6.6.0"
flake8 = "^7.0.0"
celery-types = "^0.22.0"


[build-system]
Expand Down
3 changes: 3 additions & 0 deletions backend/ypovoli/celery.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os

from celery import Celery
from celery.app.task import Task

Task.__class_getitem__ = classmethod(lambda cls, *args, **kwargs: cls) # type: ignore[attr-defined]

# Set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ypovoli.settings")
Expand Down

0 comments on commit 9402aca

Please sign in to comment.