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

from tree_sitter import Node as TSNode
from graph_sitter.codebase.codebase_graph import CodebaseGraph
from graph_sitter.core.autocommit import writer
from graph_sitter.core.class_definition import Class
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.extensions.utils import cached_property
from graph_sitter.python.detached_symbols.code_block import PyCodeBlock
from graph_sitter.python.detached_symbols.decorator import PyDecorator
from graph_sitter.python.detached_symbols.parameter import PyParameter
from graph_sitter.python.expressions.type import PyType
from graph_sitter.python.function import PyFunction
from graph_sitter.python.interfaces.has_block import PyHasBlock
from graph_sitter.python.symbol import PySymbol
from graph_sitter.writer_decorators import noapidoc, py_apidoc

@py_apidoc
class PyClass(Class[PyFunction, PyDecorator, PyCodeBlock, PyParameter, PyType], PyHasBlock, PySymbol):
    """Extends Class for Python codebases"""
    _decorated_node: TSNode | None
    constructor_keyword = ...
    def __init__(self, ts_node: TSNode, file_id: NodeId, G: CodebaseGraph, parent: PyHasBlock, decorated_node: TSNode | None = ...) -> None:
        ...
    
    @writer
    def add_source(self, source: str) -> None:
        """Adds source code to the class definition.

        Adds the provided source code string to the body of the class definition. The method handles
        proper indentation of the source code within the class body.

        Args:
            source (str): The source code to be added to the class definition. If the source doesn't
                start with a newline, it will be indented with 4 spaces.

        Raises:
            ValueError: If the class body cannot be found.
        """
        ...
    
    @cached_property
    @noapidoc
    def generics(self) -> dict[str, PyType]:
        ...
    


