from _typeshed import Incomplete

from win32com.server.exception import Exception as Exception
from win32comext.axdebug import codecontainer as codecontainer, contexts as contexts, gateways
from win32comext.axdebug.util import RaiseNotImpl as RaiseNotImpl, trace as trace

def GetGoodFileName(fname): ...

class DebugDocumentProvider(gateways.DebugDocumentProvider):
    doc: Incomplete
    def __init__(self, doc) -> None: ...
    def GetName(self, dnt): ...
    def GetDocumentClassId(self): ...
    def GetDocument(self): ...

# error: Cannot determine consistent method resolution order (MRO) for "DebugDocumentText"
# pyright doesn't have a specific error code for MRO error!
class DebugDocumentText(gateways.DebugDocumentInfo, gateways.DebugDocumentText, gateways.DebugDocument):  # type: ignore[misc]  # pyright: ignore[reportGeneralTypeIssues]
    codeContainer: Incomplete
    def __init__(self, codeContainer) -> None: ...
    def GetName(self, dnt): ...
    def GetDocumentClassId(self): ...
    def GetSize(self): ...
    def GetPositionOfLine(self, cLineNumber): ...
    def GetLineOfPosition(self, charPos): ...
    def GetText(self, charPos, maxChars, wantAttr): ...
    def GetPositionOfContext(self, context): ...
    def GetContextOfPosition(self, charPos, maxChars): ...

class CodeContainerProvider:
    ccsAndNodes: Incomplete
    def AddCodeContainer(self, cc, node: Incomplete | None = ...) -> None: ...
    def FromFileName(self, fname): ...
    def Close(self) -> None: ...
