mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Bump pydivkit and python codegen
This commit is contained in:
@@ -6,7 +6,7 @@ from __future__ import annotations
|
||||
import enum
|
||||
import typing
|
||||
|
||||
from pydivkit.core import BaseDiv, Field
|
||||
from pydivkit.core import BaseDiv, Expr, Field
|
||||
|
||||
|
||||
# A string variable.
|
||||
@@ -14,22 +14,24 @@ class StringVariable(BaseDiv):
|
||||
|
||||
def __init__(
|
||||
self, *,
|
||||
name: str,
|
||||
value: str,
|
||||
type: str = "string",
|
||||
name: typing.Optional[typing.Union[Expr, str]] = None,
|
||||
value: typing.Optional[typing.Union[Expr, str]] = None,
|
||||
**kwargs: typing.Any,
|
||||
):
|
||||
super().__init__(
|
||||
type=type,
|
||||
name=name,
|
||||
value=value,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
type: str = Field(default="string")
|
||||
name: str = Field(
|
||||
name: typing.Union[Expr, str] = Field(
|
||||
min_length=1,
|
||||
description="Variable name.",
|
||||
)
|
||||
value: str = Field(
|
||||
value: typing.Union[Expr, str] = Field(
|
||||
description="Value.",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user