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

from typing import TYPE_CHECKING
from docstring_parser import Docstring
from tree_sitter import Node as TSNode
from graph_sitter.core.autocommit import reader
from graph_sitter.core.symbol_groups.comment_group import CommentGroup
from graph_sitter.writer_decorators import noapidoc, py_apidoc
from graph_sitter.python.function import PyFunction
from graph_sitter.python.symbol import PySymbol

if TYPE_CHECKING:
    ...
@py_apidoc
class PyCommentGroup(CommentGroup):
    """A group of related symbols that represent a comment or docstring in Python

    For example:
    ```
    # Comment 1
    # Comment 2
    # Comment 3
    ```
    would be 3 individual comments (accessible via `symbols`), but together they form a `CommentGroup` (accessible via `self`).
    """
    _text: str
    @classmethod
    @noapidoc
    def from_symbol_comments(cls, symbol: PySymbol): # -> Self | None:
        ...
    
    @classmethod
    @noapidoc
    def from_symbol_inline_comments(cls, symbol: PySymbol, node: TSNode | None = ...): # -> Self | None:
        ...
    
    @classmethod
    @noapidoc
    def from_docstring(cls, symbol: PySymbol): # -> Self | None:
        ...
    
    def to_google_docstring(self, function: PyFunction) -> str:
        """Convert a comment group into a Google-style docstring.

        Processes the text content of the comment group and converts it into a properly formatted Google-style docstring,
        incorporating existing function signature information and merging any existing docstring content with the new format.

        Args:
            function (PyFunction): The Python function whose signature will be used to extract parameter and return type information.

        Returns:
            str: A formatted Google-style docstring string that includes the function's description, parameters, and return value information.
        """
        ...
    
    @noapidoc
    @reader
    def parse(self) -> Docstring:
        ...
    


