mercurial/state.py
changeset 51282 9d3721552b6c
parent 49829 8ced4ca30ea1
child 51284 f15cb5111a1e
equal deleted inserted replaced
51281:58d39c7865e5 51282:9d3721552b6c
    18 """
    18 """
    19 
    19 
    20 
    20 
    21 import contextlib
    21 import contextlib
    22 
    22 
       
    23 from typing import (
       
    24     Any,
       
    25     Dict,
       
    26 )
       
    27 
    23 from .i18n import _
    28 from .i18n import _
    24 
    29 
    25 from . import (
    30 from . import (
    26     error,
    31     error,
    27     pycompat,
       
    28     util,
    32     util,
    29 )
    33 )
    30 from .utils import cborutil
    34 from .utils import cborutil
    31 
    35 
    32 if pycompat.TYPE_CHECKING:
    36 # keeps pyflakes happy
    33     from typing import (
    37 for t in (Any, Dict):
    34         Any,
    38     assert t
    35         Dict,
       
    36     )
       
    37 
       
    38     for t in (Any, Dict):
       
    39         assert t
       
    40 
    39 
    41 
    40 
    42 class cmdstate:
    41 class cmdstate:
    43     """a wrapper class to store the state of commands like `rebase`, `graft`,
    42     """a wrapper class to store the state of commands like `rebase`, `graft`,
    44     `histedit`, `shelve` etc. Extensions can also use this to write state files.
    43     `histedit`, `shelve` etc. Extensions can also use this to write state files.