From c69e720dd86d28ed7a7ddb8034503fcc5e1db861 Mon Sep 17 00:00:00 2001 From: Tim Nyborg Date: Sun, 18 Jul 2021 13:04:27 +0100 Subject: [PATCH] Replace accepts expression as string (#671) Fixes #503 --- django-stubs/db/models/functions/text.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django-stubs/db/models/functions/text.pyi b/django-stubs/db/models/functions/text.pyi index e1ed86b..d58789c 100644 --- a/django-stubs/db/models/functions/text.pyi +++ b/django-stubs/db/models/functions/text.pyi @@ -35,7 +35,9 @@ class Repeat(BytesToCharFieldConversionMixin, Func): def __init__(self, expression: Union[Value, str], number: Optional[Union[Length, int]], **extra: Any) -> None: ... class Replace(Func): - def __init__(self, expression: Combinable, text: Value, replacement: Value = ..., **extra: Any) -> None: ... + def __init__( + self, expression: Union[Combinable, str], text: Value, replacement: Value = ..., **extra: Any + ) -> None: ... class Right(Left): ... class RPad(LPad): ...