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

Commit

Permalink
#66: Validate not only 'self' but also 'task' that is passed in Funct…
Browse files Browse the repository at this point in the history
…ion-like style syntax
blackandred committed Jul 14, 2021
1 parent 1e52109 commit 779b5d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/rkd/core/execution/analysis.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ def visit_Assign(self, node: ast.Assign):

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

if value.id == 'self':
if value.id in ['self', 'task']:
self.__self_attributes[target.attr] = True

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

value = attribute.value

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

# visit the children

0 comments on commit 779b5d5

Please sign in to comment.