Skip to content

Commit

Permalink
fix: handle identifier case (import)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Jun 5, 2024
1 parent e574802 commit 7b8a1f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/languages/python/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (analyzer *analyzer) analyzeCall(node *sitter.Node, visitChildren func() er
object := function.ChildByFieldName("object")
analyzer.lookupVariable(object)

if function.Type() == "identifier" {
analyzer.builder.Dataflow(node, object)
}

if function.Type() == "attribute" {
attribute := function.ChildByFieldName("attribute")
if attribute.Type() == "identifier" && slices.Contains(reflexiveMethods, analyzer.builder.ContentFor(attribute)) {
Expand Down

0 comments on commit 7b8a1f6

Please sign in to comment.