@@ -165,7 +165,7 @@ var AnnotationRules = On(Any).Self(
165165 // FIXME: the FunctionDeclarationReceiver is not set for methods; it should be taken from the parent
166166 // Type node Token (2 levels up) but the SDK doesn't allow this
167167 // TODO: create an issue for the SDK
168- On (HasInternalType (pyast .FunctionDef )).Roles (FunctionDeclaration , FunctionDeclarationName ).Children (
168+ On (HasInternalType (pyast .FunctionDef )).Roles (FunctionDeclaration , FunctionDeclarationName , SimpleIdentifier ).Children (
169169 On (HasInternalType ("FunctionDef.body" )).Roles (FunctionDeclarationBody ),
170170 // FIXME: change to FunctionDeclarationArgumentS once the PR has been merged
171171 On (HasInternalType ("arguments" )).Roles (FunctionDeclarationArgument ).Children (
@@ -194,7 +194,7 @@ var AnnotationRules = On(Any).Self(
194194 On (HasInternalRole ("func" )).Self (On (HasInternalRole ("id" ))).Roles (CallCallee ),
195195 On (HasInternalRole ("func" )).Self (On (HasInternalRole ("attr" ))).Roles (CallCallee ),
196196 On (HasInternalRole ("func" )).Self (On (HasInternalType (pyast .Attribute ))).Children (
197- On (HasInternalRole ("id" )).Roles (CallReceiver ),
197+ On (HasInternalRole ("id" )).Roles (CallReceiver , SimpleIdentifier ),
198198 ),
199199 ),
200200
@@ -280,8 +280,8 @@ var AnnotationRules = On(Any).Self(
280280 On (HasInternalType (pyast .IfExp )).Roles (If ),
281281 On (HasInternalType (pyast .Import )).Roles (ImportDeclaration ),
282282 On (HasInternalType (pyast .ImportFrom )).Roles (ImportDeclaration ),
283- On (HasInternalType (pyast .Alias )).Roles (ImportAlias ),
284- On (HasInternalType (pyast .ClassDef )).Roles (TypeDeclaration ).Children (
283+ On (HasInternalType (pyast .Alias )).Roles (ImportAlias , SimpleIdentifier ),
284+ On (HasInternalType (pyast .ClassDef )).Roles (TypeDeclaration , SimpleIdentifier ).Children (
285285 On (HasInternalType ("ClassDef.body" )).Roles (TypeDeclarationBody ),
286286 On (HasInternalType ("ClassDef.bases" )).Roles (TypeDeclarationBases ),
287287 ),
@@ -313,7 +313,7 @@ var AnnotationRules = On(Any).Self(
313313 ),
314314 // Repr already comes as a Call \o/
315315 // Print as a function too.
316- On (HasInternalType (pyast .Print )).Roles (Call , CallCallee ).Children (
316+ On (HasInternalType (pyast .Print )).Roles (Call , CallCallee , SimpleIdentifier ).Children (
317317 On (HasInternalRole ("dest" )).Roles (CallPositionalArgument ),
318318 On (HasInternalRole ("nl" )).Roles (CallPositionalArgument ),
319319 On (HasInternalRole ("values" )).Roles (CallPositionalArgument ).Children (
@@ -346,6 +346,5 @@ var AnnotationRules = On(Any).Self(
346346 On (HasInternalRole ("left" )).Roles (BinaryExpressionLeft ),
347347 ),
348348 ),
349-
350349 ),
351350)
0 commit comments