changeset 51411:774e4eff6e47

phases: type annotation for `_phasesets` Does not hurt.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 21 Feb 2024 11:04:56 +0100
parents eababb7b4a82
children 89b638afeb07
files mercurial/phases.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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"""