@@ -31,7 +31,7 @@ def __repr__(self) -> str:
3131 """
3232
3333 @abstractmethod
34- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
34+ def apply (self , eval_stack : List [float ]) -> None :
3535 """Apply a formula operation on the eval_stack.
3636
3737 Args:
@@ -50,7 +50,7 @@ def __repr__(self) -> str:
5050 """
5151 return "+"
5252
53- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
53+ def apply (self , eval_stack : List [float ]) -> None :
5454 """Extract two values from the stack, add them, push the result back in.
5555
5656 Args:
@@ -73,7 +73,7 @@ def __repr__(self) -> str:
7373 """
7474 return "-"
7575
76- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
76+ def apply (self , eval_stack : List [float ]) -> None :
7777 """Extract two values from the stack, subtract them, push the result back in.
7878
7979 Args:
@@ -96,7 +96,7 @@ def __repr__(self) -> str:
9696 """
9797 return "*"
9898
99- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
99+ def apply (self , eval_stack : List [float ]) -> None :
100100 """Extract two values from the stack, multiply them, push the result back in.
101101
102102 Args:
@@ -119,7 +119,7 @@ def __repr__(self) -> str:
119119 """
120120 return "/"
121121
122- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
122+ def apply (self , eval_stack : List [float ]) -> None :
123123 """Extract two values from the stack, divide them, push the result back in.
124124
125125 Args:
@@ -168,7 +168,7 @@ def __repr__(self) -> str:
168168 """
169169 return f"avg({ ', ' .join (repr (f ) for f in self ._fetchers )} )"
170170
171- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
171+ def apply (self , eval_stack : List [float ]) -> None :
172172 """Calculate average of given metrics, push the average to the eval_stack.
173173
174174 Args:
@@ -243,7 +243,7 @@ def __repr__(self) -> str:
243243 """
244244 return self ._name
245245
246- def apply (self , eval_stack : List [Optional [ float ] ]) -> None :
246+ def apply (self , eval_stack : List [float ]) -> None :
247247 """Push the latest value from the stream into the evaluation stack.
248248
249249 Args:
@@ -262,4 +262,4 @@ def apply(self, eval_stack: List[Optional[float]]) -> None:
262262 else :
263263 eval_stack .append (float ("NaN" ))
264264 else :
265- eval_stack .append (self . _next_value . value )
265+ eval_stack .append (next_value )
0 commit comments