phases: type annotation for `_phasesets`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 21 Feb 2024 11:04:56 +0100
changeset 51411 774e4eff6e47
parent 51410 eababb7b4a82
child 51412 89b638afeb07
phases: type annotation for `_phasesets` Does not hurt.
mercurial/phases.py
--- a/mercurial/phases.py	Tue Feb 20 23:46:21 2024 +0100
+++ b/mercurial/phases.py	Wed Feb 21 11:04:56 2024 +0100
@@ -134,6 +134,7 @@
 )
 
 Phaseroots = Dict[int, Set[int]]
+PhaseSets = Dict[int, Set[int]]
 
 if typing.TYPE_CHECKING:
     from . import (
@@ -377,7 +378,7 @@
             self._phaseroots: Phaseroots = loaded[0]
             self.dirty: bool = loaded[1]
             self._loadedrevslen = 0
-            self._phasesets = None
+            self._phasesets: PhaseSets = None
 
     def hasnonpublicphases(self, repo: "localrepo.localrepository") -> bool:
         """detect if there are revisions with non-public phase"""