mercurial/context.py
changeset 52452 9d79ffeed7c0
parent 51859 f4733654f144
child 52640 24ee91ba9aa8
--- a/mercurial/context.py	Mon Dec 09 00:01:03 2024 -0500
+++ b/mercurial/context.py	Mon Dec 09 00:21:38 2024 -0500
@@ -37,6 +37,9 @@
     testing,
     util,
 )
+from .interfaces import (
+    status as istatus,
+)
 from .utils import (
     dateutil,
     stringutil,
@@ -99,7 +102,7 @@
 
     def _buildstatus(
         self, other, s, match, listignored, listclean, listunknown
-    ):
+    ) -> istatus.Status:
         """build a status with respect to another context"""
         # Load earliest manifest first for caching reasons. More specifically,
         # if you have revisions 1000 and 1001, 1001 is probably stored as a
@@ -388,7 +391,7 @@
         listclean=False,
         listunknown=False,
         listsubrepos=False,
-    ):
+    ) -> istatus.Status:
         """return status of files between two nodes or node and working
         directory.
 
@@ -1905,7 +1908,9 @@
                 # Even if the wlock couldn't be grabbed, clear out the list.
                 self._repo.clearpostdsstatus()
 
-    def _dirstatestatus(self, match, ignored=False, clean=False, unknown=False):
+    def _dirstatestatus(
+        self, match, ignored=False, clean=False, unknown=False
+    ) -> istatus.Status:
         '''Gets the status from the dirstate -- internal use only.'''
         subrepos = []
         if b'.hgsub' in self:
@@ -2729,7 +2734,9 @@
             repo, text, user, date, extra, changes
         )
 
-    def _dirstatestatus(self, match, ignored=False, clean=False, unknown=False):
+    def _dirstatestatus(
+        self, match, ignored=False, clean=False, unknown=False
+    ) -> istatus.Status:
         """Return matched files only in ``self._status``
 
         Uncommitted files appear "clean" via this context, even if
@@ -2924,7 +2931,7 @@
         return man
 
     @propertycache
-    def _status(self):
+    def _status(self) -> istatus.Status:
         """Calculate exact status from ``files`` specified at construction"""
         man1 = self.p1().manifest()
         p2 = self._parents[1]
@@ -3089,7 +3096,7 @@
         return self._originalctx.manifest()
 
     @propertycache
-    def _status(self):
+    def _status(self) -> istatus.Status:
         """Calculate exact status from ``files`` specified in the ``origctx``
         and parents manifests.
         """