Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Commit 779b5d5

Browse files
committed
#66: Validate not only 'self' but also 'task' that is passed in Function-like style syntax
1 parent 1e52109 commit 779b5d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/rkd/core/execution/analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def visit_Assign(self, node: ast.Assign):
3535

3636
value: Union[ast.Name, any] = target.value
3737

38-
if value.id == 'self':
38+
if value.id in ['self', 'task']:
3939
self.__self_attributes[target.attr] = True
4040

4141
self.generic_visit(node)
@@ -54,7 +54,7 @@ def visit_Call(self, node: ast.Call):
5454

5555
value = attribute.value
5656

57-
if isinstance(value, ast.Name) and value.id == 'self':
57+
if isinstance(value, ast.Name) and value.id in ['self', 'task']:
5858
self.__self_calls[called_attribute_name] = True
5959

6060
# visit the children

0 commit comments

Comments
 (0)