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

from typing import Annotated, Any
from pydantic import BaseModel, PlainSerializer, PlainValidator, WithJsonSchema
from pydantic_core.core_schema import ValidationInfo
from tree_sitter import Range
from graph_sitter.writer_decorators import apidoc

def validate_range(value: Any, info: ValidationInfo) -> Range:
    ...

RangeAdapter = Annotated[Range, PlainValidator(validate_range), PlainSerializer(lambda range: { "start_byte": range.start_byte,"end_byte": range.end_byte,"start_point": { "row": range.start_point.row,"column": range.start_point.column },"end_point": { "row": range.end_point.row,"column": range.end_point.column } }), WithJsonSchema({ "type": "object","properties": { "start_byte": { "type": "integer" },"end_byte": { "type": "integer" },"start_point": { "type": "object","properties": { "row": { "type": "integer" },"column": { "type": "integer" } } },"end_point": { "type": "object","properties": { "row": { "type": "integer" },"column": { "type": "integer" } } } } }),]
@apidoc
class Span(BaseModel):
    """Range within the codebase"""
    model_config = ...
    range: RangeAdapter
    filepath: str


