"""
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.node_id_factory import NodeId
from graph_sitter.core.statements.assignment_statement import AssignmentStatement
from graph_sitter.python.assignment import PyAssignment
from graph_sitter.writer_decorators import py_apidoc
from graph_sitter.python.detached_symbols.code_block import PyCodeBlock

if TYPE_CHECKING:
    ...
logger = ...
@py_apidoc
class PyAssignmentStatement(AssignmentStatement["PyCodeBlock", PyAssignment]):
    """A class that represents a Python assignment statement in a codebase, such as `x = 1` or `a, b = 1, 2`.

    This includes potentially multiple Assignments via `statement.assignments`, which represent each assignment of a value to a variable within this statement.

    For example, assigning to a list, or assigning multiple values to multiple variables in a single statement.
    """
    assignment_types = ...
    @classmethod
    def from_assignment(cls, ts_node: TSNode, file_node_id: NodeId, G: CodebaseGraph, parent: PyCodeBlock, pos: int, assignment_node: TSNode) -> PyAssignmentStatement:
        """Creates a PyAssignmentStatement instance from a TreeSitter assignment node.

        Factory method to create appropriate assignment statement objects based on the node type and parent context.
        If the parent is a PyClass, creates a PyAttribute, otherwise creates a PyAssignmentStatement.

        Args:
            ts_node (TSNode): The TreeSitter node representing the entire statement.
            file_node_id (NodeId): The ID of the file containing this node.
            G (CodebaseGraph): The codebase graph instance.
            parent (PyHasBlock): The parent block containing this statement.
            code_block (PyCodeBlock): The code block containing this statement.
            pos (int): The position of this statement within its code block.
            assignment_node (TSNode): The TreeSitter node representing the assignment operation.

        Returns:
            PyAssignmentStatement: A new assignment statement instance, either PyAttribute or PyAssignmentStatement.

        Raises:
            ValueError: If the assignment_node type is not one of the supported assignment types.
        """
        ...
    


