diff --git a/src/Famix-Python-Importer-Tests/FamixPythonImporterWithFunctionsTest.class.st b/src/Famix-Python-Importer-Tests/FamixPythonImporterWithFunctionsTest.class.st index d87fe97..d2010fc 100644 --- a/src/Famix-Python-Importer-Tests/FamixPythonImporterWithFunctionsTest.class.st +++ b/src/Famix-Python-Importer-Tests/FamixPythonImporterWithFunctionsTest.class.st @@ -21,7 +21,7 @@ FamixPythonImporterWithFunctionsTest >> testFunction [ | func | func := self functionNamed: 'tryToPlaceWord'. self assert: func class equals: FamixPythonFunction. - self assert: func signature equals: 'grid,word' + self assert: func signature equals: 'tryToPlaceWord(grid,word)' ] { #category : 'tests - functions' } diff --git a/src/Famix-Python-Importer/PyAssignmentStatementNode.extension.st b/src/Famix-Python-Importer/PyAssignmentStatementNode.extension.st index 278a655..2e45b86 100644 --- a/src/Famix-Python-Importer/PyAssignmentStatementNode.extension.st +++ b/src/Famix-Python-Importer/PyAssignmentStatementNode.extension.st @@ -4,5 +4,7 @@ Extension { #name : 'PyAssignmentStatementNode' } PyAssignmentStatementNode >> isInstanceVariableAssignation [ "I am an inst var assignation if I am in the form of `self.x = y`. For now I don't know if I need to do more than checking if the value of the receiver of the left side is #self. I might refine this method later." + self lhs isSubscriptExpression ifTrue: [ ^ false ]. + ^ self lhs receiver name = #self ] diff --git a/src/Famix-Python-Importer/PyRootNode.extension.st b/src/Famix-Python-Importer/PyRootNode.extension.st index e71a557..76eb660 100644 --- a/src/Famix-Python-Importer/PyRootNode.extension.st +++ b/src/Famix-Python-Importer/PyRootNode.extension.st @@ -7,6 +7,12 @@ PyRootNode >> fileReference [ ^ self filename ] +{ #category : '*Famix-Python-Importer' } +PyRootNode >> isSubscriptExpression [ + + ^ false +] + { #category : '*Famix-Python-Importer' } PyRootNode >> sourceFrom: startPosition to: stopPosition [ diff --git a/src/Famix-Python-Importer/PySubscriptExpressionNode.extension.st b/src/Famix-Python-Importer/PySubscriptExpressionNode.extension.st new file mode 100644 index 0000000..9a50655 --- /dev/null +++ b/src/Famix-Python-Importer/PySubscriptExpressionNode.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'PySubscriptExpressionNode' } + +{ #category : '*Famix-Python-Importer' } +PySubscriptExpressionNode >> isSubscriptExpression [ + + ^ true +]