"""
This type stub file was generated by pyright.
"""

from typing import TYPE_CHECKING
from tree_sitter import Node as TSNode
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.assignment import Assignment
from graph_sitter.core.expressions.multi_expression import MultiExpression
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.extensions.autocommit import reader
from graph_sitter.python.symbol import PySymbol
from graph_sitter.python.symbol_groups.comment_group import PyCommentGroup
from graph_sitter.writer_decorators import noapidoc, py_apidoc
from graph_sitter.python.statements.assignment_statement import PyAssignmentStatement

if TYPE_CHECKING:
    ...
@py_apidoc
class PyAssignment(Assignment["PyAssignmentStatement"], PySymbol):
    """An abstract representation of a assignment in python.

    This includes assignments of variables to functions, other variables, class instantiations, etc.
    """
    @noapidoc
    @classmethod
    def from_assignment(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: PyAssignmentStatement) -> MultiExpression[PyAssignmentStatement, PyAssignment]:
        ...
    
    @classmethod
    def from_named_expression(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: PyAssignmentStatement) -> MultiExpression[PyAssignmentStatement, PyAssignment]:
        """Creates a MultiExpression from a Python named expression.

        Creates assignments from a named expression node ('walrus operator' :=) by parsing its name and value fields.

        Args:
            ts_node (TSNode): The TreeSitter node representing the named expression.
            file_node_id (NodeId): The identifier of the file containing this node.
            G (CodebaseGraph): The codebase graph instance.
            parent (Parent): The parent node that contains this expression.

        Returns:
            MultiExpression[Parent, PyAssignment]: A MultiExpression containing the assignments created from the named expression.

        Raises:
            ValueError: If the provided ts_node is not of type 'named_expression'.
        """
        ...
    
    @property
    @reader
    def comment(self) -> PyCommentGroup | None:
        """Returns the comment group associated with the symbol.

        Retrieves and returns any comments associated with the symbol. These comments are typically
        located above or adjacent to the symbol in the source code.

        Args:
            self: The symbol instance to retrieve comments for.

        Returns:
            PyCommentGroup | None: A comment group object containing the symbol's comments if they exist,
            None otherwise.
        """
        ...
    
    @property
    @reader
    def inline_comment(self) -> PyCommentGroup | None:
        """A property that retrieves the inline comment group associated with a symbol.

        Retrieves any inline comments that are associated with this symbol. Inline comments are comments that appear on the same line as the code.

        Args:
            None

        Returns:
            PyCommentGroup | None: The inline comment group associated with the symbol, if one exists. Returns None if there are no inline comments.
        """
        ...
    


