diff --git a/languages/tree-sitter-stack-graphs-python/src/stack-graphs.tsg b/languages/tree-sitter-stack-graphs-python/src/stack-graphs.tsg index 5fb407ae8..8b2342804 100644 --- a/languages/tree-sitter-stack-graphs-python/src/stack-graphs.tsg +++ b/languages/tree-sitter-stack-graphs-python/src/stack-graphs.tsg @@ -860,7 +860,7 @@ inherit .parent_module [ (parameter/typed_parameter - . (_) @name) @param + . (identifier) @name) @param (parameter/list_splat_pattern (_) @name) @param (parameter/dictionary_splat_pattern diff --git a/languages/tree-sitter-stack-graphs-python/test/typed_splat_parameters.py b/languages/tree-sitter-stack-graphs-python/test/typed_splat_parameters.py new file mode 100644 index 000000000..bc94aa782 --- /dev/null +++ b/languages/tree-sitter-stack-graphs-python/test/typed_splat_parameters.py @@ -0,0 +1,10 @@ +from typing import Any + +def foo(*bar: Any): + # ^defined: 1 + pass + +def duux(**quux: Any): + # ^defined: 1 + pass +