Skip to content

Fixed faulty python function parameter parsing#28

Merged
chengpeng-wang merged 3 commits intoPurCL:mainfrom
acezxn:python_tsanalyzer_bug_fix
Mar 12, 2026
Merged

Fixed faulty python function parameter parsing#28
chengpeng-wang merged 3 commits intoPurCL:mainfrom
acezxn:python_tsanalyzer_bug_fix

Conversation

@acezxn
Copy link
Contributor

@acezxn acezxn commented Mar 12, 2026

In Python_TS_Analyzer.py, the function get_parameters_in_single_function() only checks nodes with the type "identifier" when finding parameters. Since identifier nodes are also present within type annotations, this fault would cause type annotations to be mistakenly interpreted as a separate parameter.

The fix added a new condition to check if the parent of an identifier node (if it exist) has type "type", If so, the identifier node would be ignored.

@chengpeng-wang chengpeng-wang merged commit 160f5bc into PurCL:main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants