Refined tree-sitter query for Python Parameter matches
⚡️ What's your motivation?
Fixes #181
The Parameter Type tree-sitter query for Python allowed three optional keyword arguments, 1 for the name argument and 2 for the regular expressions argument in two different formats (string and concatenated-string).
This works fine with valid parameter type definitions using the keyword arguments in the order in which they are declared. However, the query fails in the following scenarios:
The keyword arguments order is in reverse order. This fails to detect the parameter type but does not prevent reading from that glue file or other glue files.
Any Python callable with either of name or regexp as keyword arguments yields a partial match (as the query specifies more arguments as optional), however the language service requires both and yields an unhandled exception as a result which prevents reading from all glue files entirely.
🏷️ What kind of change is this?
:bug: Bug fix (non-breaking change which fixes a defect)
🤔 What's changed?
⚡️ What's your motivation?
The Parameter Type tree-sitter query for Python allowed three optional keyword arguments, 1 for the name argument and 2 for the regular expressions argument in two different formats (
string
andconcatenated-string
).This works fine with valid parameter type definitions using the keyword arguments in the order in which they are declared. However, the query fails in the following scenarios:
name
orregexp
as keyword arguments yields a partial match (as the query specifies more arguments as optional), however the language service requires both and yields an unhandled exception as a result which prevents reading from all glue files entirely.🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.