Skip to main content
View Source on Github

Inherits from

CommentGroup, SymbolGroup, Editable

Attributes

extended

extended_source

file

file_node_id

filepath

function_calls

next_named_sibling

next_sibling

node_type

parent

parent_class

parent_function

parent_statement

source

symbols

text

ts_node

variable_usages

Methods

ancestors

Find all ancestors of the node of the given type. Does not return itself
View Source on Github

edit

Replace the source of this node with new text.
View Source on Github

Parameters

edit_text

Replace the text content of a comment group with new text.
View Source on Github

Parameters

find

Search for substrings in the given symbols that match strings_to_match.
View Source on Github

Parameters

find_string_literals

Search for string literals matching given strings in the SymbolGroup.
View Source on Github

Parameters

flag

Adds a visual flag comment to the end of this Editable’s source text.
View Source on Github

get_variable_usages

Returns Editables for all TreeSitter nodes corresponding to instances of variable usage
View Source on Github

Parameters

insert_after

Inserts source code after this node in the codebase.
View Source on Github

Parameters

insert_before

Inserts source code before this symbol group.
View Source on Github

Parameters

is_wrapped_in

Check if this node is contained another node of the given class
View Source on Github

parent_of_type

Find the first ancestor of the node of the given type. Does not return itself
View Source on Github

reduce_condition

Reduces an editable to the following condition
View Source on Github

remove

Removes this node and its related extended nodes from the codebase.
View Source on Github

Parameters

replace

Replaces all instances of a string with a new string in all symbols within the group.
View Source on Github

Parameters

Searches for regex matches in the codebase.
View Source on Github

Parameters

to_google_docstring

Convert a comment group into a Google-style docstring.
View Source on Github

Parameters