diff options
author | Nao Pross <np@0hm.ch> | 2024-05-09 18:33:01 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-09 18:33:01 +0200 |
commit | 52042d79924fada56cfb7d5d21a2f70bf4016381 (patch) | |
tree | a024eb45c02ca64975ed401eb609033c5dd1b248 | |
parent | Cleanup some typing issues and comments (diff) | |
download | polymatrix-52042d79924fada56cfb7d5d21a2f70bf4016381.tar.gz polymatrix-52042d79924fada56cfb7d5d21a2f70bf4016381.zip |
Remove redundant case in FromStateMonadMixin
Diffstat (limited to '')
-rw-r--r-- | polymatrix/expression/mixins/fromstatemonad.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/polymatrix/expression/mixins/fromstatemonad.py b/polymatrix/expression/mixins/fromstatemonad.py index a5970b1..254d125 100644 --- a/polymatrix/expression/mixins/fromstatemonad.py +++ b/polymatrix/expression/mixins/fromstatemonad.py @@ -27,13 +27,7 @@ class FromStateMonadMixin(ExpressionBaseMixin): state, expr = self.monad.apply(state) # Case when monad wraps function # f: ExpressionState -> (State, Expression) - if isinstance(expr, Expression): - return expr.underlying.apply(state) - - # Case when monad wraps function - # f: ExpressionState -> (State, M) - # where M is a mixin class - elif isinstance(expr, ExpressionBaseMixin): + if isinstance(expr, Expression | ExpressionBaseMixin): return expr.apply(state) # Case when monad wraps function |