Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if blocks and apparent circular dependencies #179

Open
mrdobalina2k opened this issue Aug 12, 2022 · 0 comments
Open

if blocks and apparent circular dependencies #179

mrdobalina2k opened this issue Aug 12, 2022 · 0 comments
Assignees

Comments

@mrdobalina2k
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants