Skip to content

Commit

Permalink
mypy: fix typing error for tree-sitter.Node.text (#2015)
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Chan <[email protected]>
  • Loading branch information
arthurscchan authored Jan 22, 2025
1 parent a8c12d8 commit 3a7d390
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fuzz_introspector/frontends/frontend_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ def _process_invoke(self, expr: Node,
logger.debug('Matched function: %s', matched_func.name)
target_name = matched_func.name
else:
if func.child_by_field_name('name') is not None:
target_name2 = func.child_by_field_name(
'name').text.decode()
name_node = func.child_by_field_name('name')
if name_node and name_node.text:
target_name2 = name_node.text.decode()
matched_func2 = get_function_node(
target_name2,
project.all_functions,
Expand Down

0 comments on commit 3a7d390

Please sign in to comment.