Skip to content

Commit 3a9845e

Browse files
authored
Add types for MD5 database function (#1830)
1 parent 9c6e239 commit 3a9845e

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

django-stubs/db/models/functions/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ from .math import Sign as Sign
5151
from .math import Sin as Sin
5252
from .math import Sqrt as Sqrt
5353
from .math import Tan as Tan
54+
from .text import MD5 as MD5
5455
from .text import SHA1 as SHA1
5556
from .text import SHA224 as SHA224
5657
from .text import SHA256 as SHA256

django-stubs/db/models/functions/text.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class LPad(Func):
5050
) -> None: ...
5151

5252
class LTrim(Transform): ...
53+
class MD5(OracleHashMixin, Transform): ...
5354

5455
class Ord(Transform):
5556
output_field: models.IntegerField

scripts/stubtest/allowlist_todo.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,6 @@ django.db.models.functions.ExtractYear.class_lookups
13861386
django.db.models.functions.JSONObject.as_oracle
13871387
django.db.models.functions.JSONObject.as_postgresql
13881388
django.db.models.functions.JSONObject.as_sql
1389-
django.db.models.functions.MD5
13901389
django.db.models.functions.Now.as_mysql
13911390
django.db.models.functions.Now.as_postgresql
13921391
django.db.models.functions.NullIf.as_oracle
@@ -1433,7 +1432,6 @@ django.db.models.functions.mixins.FixDurationInputMixin.as_mysql
14331432
django.db.models.functions.mixins.FixDurationInputMixin.as_oracle
14341433
django.db.models.functions.text.Concat.function
14351434
django.db.models.functions.text.ConcatPair.as_postgresql
1436-
django.db.models.functions.text.MD5
14371435
django.db.models.indexes.IndexExpression.wrapper_classes
14381436
django.db.models.lookups.FieldGetDbPrepValueIterableMixin.batch_process_rhs
14391437
django.db.models.lookups.FieldGetDbPrepValueIterableMixin.process_rhs

0 commit comments

Comments
 (0)