mercurial/interfaces/dirstate.py
changeset 52452 9d79ffeed7c0
parent 52431 2c8c46c3c401
child 52507 8820c991aee4
equal deleted inserted replaced
52451:f5d134e57f51 52452:9d79ffeed7c0
    20 if typing.TYPE_CHECKING:
    20 if typing.TYPE_CHECKING:
    21     # Almost all mercurial modules are only imported in the type checking phase
    21     # Almost all mercurial modules are only imported in the type checking phase
    22     # to avoid circular imports
    22     # to avoid circular imports
    23     from .. import (
    23     from .. import (
    24         match as matchmod,
    24         match as matchmod,
    25         scmutil,
       
    26         transaction as txnmod,
    25         transaction as txnmod,
    27     )
    26     )
       
    27 
       
    28     from . import status as istatus
    28 
    29 
    29     # TODO: finish adding type hints
    30     # TODO: finish adding type hints
    30     AddParentChangeCallbackT = Callable[
    31     AddParentChangeCallbackT = Callable[
    31         ["idirstate", Tuple[Any, Any], Tuple[Any, Any]], Any
    32         ["idirstate", Tuple[Any, Any], Tuple[Any, Any]], Any
    32     ]
    33     ]
    47 
    48 
    48     FlagFuncReturnT = Callable[[bytes], bytes]
    49     FlagFuncReturnT = Callable[[bytes], bytes]
    49     """The return type of dirstate.flagfunc()."""
    50     """The return type of dirstate.flagfunc()."""
    50 
    51 
    51     # TODO: verify and complete this- it came from a pytype *.pyi file
    52     # TODO: verify and complete this- it came from a pytype *.pyi file
    52     StatusReturnT = Tuple[Any, scmutil.status, Any]
    53     StatusReturnT = Tuple[Any, istatus.Status, Any]
    53     """The return type of dirstate.status()."""
    54     """The return type of dirstate.status()."""
    54 
    55 
    55     # TODO: probably doesn't belong here.
    56     # TODO: probably doesn't belong here.
    56     TransactionT = txnmod.transaction
    57     TransactionT = txnmod.transaction
    57     """The type for a transaction used with dirstate.
    58     """The type for a transaction used with dirstate.