Skip to content

if blocks and apparent circular dependencies #179

@mrdobalina2k

Description

@mrdobalina2k

say you have this code in an @equation() decorated function inside an item:

@Equation()
def eval(self, scope):
x = scope.y
if x > 0:
 x = 2

scope.x = x

you will get a circular dependency warning. If you write the code as this:

@Equation()
def eval(self, scope):
x = scope.y
scope.x = x
if x > 0:
  x2 = 2
  scope.x = x2

you don't get a warning. The code is the same. There should be no warning, since there is no true circular dependency.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions