D7383: state: add a pytype annotation
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Nov 19 03:50:13 UTC 2019
Closed by commit rHG127d46468a45: state: add a pytype annotation (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7383?vs=18070&id=18225
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7383/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7383
AFFECTED FILES
mercurial/state.py
CHANGE DETAILS
diff --git a/mercurial/state.py b/mercurial/state.py
--- a/mercurial/state.py
+++ b/mercurial/state.py
@@ -27,6 +27,15 @@
)
from .utils import cborutil
+if not globals():
+ from typing import (
+ Any,
+ Dict,
+ )
+
+ for t in (Any, Dict):
+ assert t
+
class cmdstate(object):
"""a wrapper class to store the state of commands like `rebase`, `graft`,
@@ -50,6 +59,7 @@
self.fname = fname
def read(self):
+ # type: () -> Dict[bytes, Any]
"""read the existing state file and return a dict of data stored"""
return self._read()
To: durin42, #hg-reviewers, dlax, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list