diff mercurial/interfaces/repository.py @ 52906:bde94bd8e8a2

typing: use a protocol to annotate `pathutil.dirs` in repository.py That is one external import for the repository interface module. One more to go.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 08 Feb 2025 18:15:18 +0100
parents 483b0bb23085
children 4fa0d89d1bdb
line wrap: on
line diff
--- a/mercurial/interfaces/repository.py	Sat Feb 08 18:12:29 2025 +0100
+++ b/mercurial/interfaces/repository.py	Sat Feb 08 18:15:18 2025 +0100
@@ -31,9 +31,6 @@
 
     # Almost all mercurial modules are only imported in the type checking phase
     # to avoid circular imports
-    from .. import (
-        pathutil,
-    )
     from ..utils import (
         urlutil,
     )
@@ -1178,7 +1175,7 @@
         """
 
     @abc.abstractmethod
-    def dirs(self) -> pathutil.dirs:
+    def dirs(self) -> misc.IDirs:
         """Returns an object implementing the ``idirs`` interface."""
 
     @abc.abstractmethod