Skip to content

Commit 4748a84

Browse files
committed
Fix AsType signature
1 parent ae21541 commit 4748a84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/django_mysql/models/functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,11 @@ class AsType(Func):
380380
function = ""
381381
template = "%(expressions)s AS %(data_type)s"
382382

383-
def __init__(self, expression: ExpressionArgument, data_type: str) -> None:
383+
def __init__(
384+
self,
385+
expression: Expression | str | float | int | dt.date | dt.time | dt.datetime,
386+
data_type: str,
387+
) -> None:
384388
from django_mysql.models.fields.dynamic import KeyTransform
385389

386390
if not hasattr(expression, "resolve_expression"):

0 commit comments

Comments
 (0)