summaryrefslogtreecommitdiff
path: root/django/db/models/functions/base.py
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-02-01 18:41:56 +0200
committerTim Graham <timograham@gmail.com>2017-02-01 11:41:56 -0500
commit8838d4dd498c8f66ea4237fe8a79a5f77d6f95c9 (patch)
treeb75fa27930b8758ad36669b523b084ac09ce290b /django/db/models/functions/base.py
parent0ec4dc91e0e7befdd06aa0613b5d0fbe3c785ee7 (diff)
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
Diffstat (limited to 'django/db/models/functions/base.py')
-rw-r--r--django/db/models/functions/base.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/db/models/functions/base.py b/django/db/models/functions/base.py
index e9bf01ff0d..905f740a6c 100644
--- a/django/db/models/functions/base.py
+++ b/django/db/models/functions/base.py
@@ -165,9 +165,8 @@ class Length(Transform):
function = 'LENGTH'
lookup_name = 'length'
- def __init__(self, expression, **extra):
- output_field = extra.pop('output_field', fields.IntegerField())
- super().__init__(expression, output_field=output_field, **extra)
+ def __init__(self, expression, *, output_field=None, **extra):
+ super().__init__(expression, output_field=output_field or fields.IntegerField(), **extra)
def as_mysql(self, compiler, connection):
return super().as_sql(compiler, connection, function='CHAR_LENGTH')