Skip to content

Commit

Permalink
[REF-3321] implement var operation decorator (reflex-dev#3698)
Browse files Browse the repository at this point in the history
* implement var operation decorator

* use older syntax

* use cast and older syntax

* use something even simpler

* add some tests

* use old union tactics

* that's not how you do things

* implement arithmetic operations while we're at it

* add test

* even more operations

* can't use __bool__

* thanos snap

* forgot ruff

* use default factory

* dang it darglint

* i know i should have done that but

* convert values into literalvars

* make test pass

* use older union tactics

* add test to string var

* pright why do you hate me 🥺
  • Loading branch information
adhami3310 authored Jul 25, 2024
1 parent 0845d2e commit ede5cd1
Show file tree
Hide file tree
Showing 7 changed files with 2,713 additions and 578 deletions.
26 changes: 14 additions & 12 deletions reflex/experimental/vars/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
"""Experimental Immutable-Based Var System."""

from .base import ArrayVar as ArrayVar
from .base import BooleanVar as BooleanVar
from .base import ConcatVarOperation as ConcatVarOperation
from .base import FunctionStringVar as FunctionStringVar
from .base import FunctionVar as FunctionVar
from .base import ImmutableVar as ImmutableVar
from .base import LiteralArrayVar as LiteralArrayVar
from .base import LiteralBooleanVar as LiteralBooleanVar
from .base import LiteralNumberVar as LiteralNumberVar
from .base import LiteralObjectVar as LiteralObjectVar
from .base import LiteralStringVar as LiteralStringVar
from .base import LiteralVar as LiteralVar
from .base import NumberVar as NumberVar
from .base import ObjectVar as ObjectVar
from .base import StringVar as StringVar
from .base import VarOperationCall as VarOperationCall
from .base import var_operation as var_operation
from .function import FunctionStringVar as FunctionStringVar
from .function import FunctionVar as FunctionVar
from .function import VarOperationCall as VarOperationCall
from .number import BooleanVar as BooleanVar
from .number import LiteralBooleanVar as LiteralBooleanVar
from .number import LiteralNumberVar as LiteralNumberVar
from .number import NumberVar as NumberVar
from .sequence import ArrayJoinOperation as ArrayJoinOperation
from .sequence import ArrayVar as ArrayVar
from .sequence import ConcatVarOperation as ConcatVarOperation
from .sequence import LiteralArrayVar as LiteralArrayVar
from .sequence import LiteralStringVar as LiteralStringVar
from .sequence import StringVar as StringVar
Loading

0 comments on commit ede5cd1

Please sign in to comment.