# HG changeset patch # User Andrey Skvortsov # Date 1507642737 -10800 # Node ID 46d9955e110146317230c1764a14cf344fc98d2a # Parent c4ba411f8c8995a79560eaa067daf4aa33b0e765 fix error for functions with VAR_IN_OUT The problem was found by pylint '(used-before-assignment) Using variable "X" before assignment' diff -r c4ba411f8c89 -r 46d9955e1101 PLCGenerator.py --- a/PLCGenerator.py Tue Oct 10 14:01:46 2017 +0300 +++ b/PLCGenerator.py Tue Oct 10 16:38:57 2017 +0300 @@ -1064,7 +1064,7 @@ if parameter in inout_variables: expression = self.ComputeExpression(body, connections, executionOrderId > 0, True) if expression is not None: - inout_variables[parameter] = value + inout_variables[parameter] = expression else: expression = self.ComputeExpression(body, connections, executionOrderId > 0) if expression is not None: diff -r c4ba411f8c89 -r 46d9955e1101 tests/tools/check_source.sh --- a/tests/tools/check_source.sh Tue Oct 10 14:01:46 2017 +0300 +++ b/tests/tools/check_source.sh Tue Oct 10 16:38:57 2017 +0300 @@ -240,6 +240,7 @@ enable=$enable,E1305 # (too-many-format-args) Too many arguments for format string enable=$enable,E0704 # (misplaced-bare-raise) The raise statement is not inside an except clause enable=$enable,C0123 # (unidiomatic-typecheck) Using type() instead of isinstance() for a typecheck. + enable=$enable,E0601 # (used-before-assignment) # enable= options=