diff mercurial/configuration/rcutil.py @ 52456:3e79ca017157

config: gather constant and type into the `__init__.py` This will help using them in multiple files.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 23 Oct 2024 00:43:17 +0200
parents e3b45916c375
children 22129ce9f86d
line wrap: on
line diff
--- a/mercurial/configuration/rcutil.py	Wed Oct 23 01:12:52 2024 +0200
+++ b/mercurial/configuration/rcutil.py	Wed Oct 23 00:43:17 2024 +0200
@@ -13,11 +13,10 @@
     Dict,
     List,
     Optional,
-    Tuple,
-    Union,
 )
 
 from .. import (
+    configuration as conf_mod,
     encoding,
     localrepo,
     pycompat,
@@ -37,17 +36,10 @@
 systemrcpath = scmplatform.systemrcpath
 userrcpath = scmplatform.userrcpath
 
-ConfigItemT = Tuple[bytes, bytes, bytes, bytes]
-ResourceIDT = Tuple[bytes, bytes]
-FileRCT = bytes
-ComponentT = Tuple[
-    bytes,
-    Union[
-        List[ConfigItemT],
-        FileRCT,
-        ResourceIDT,
-    ],
-]
+ComponentT = conf_mod.ComponentT
+ConfigItemT = conf_mod.ConfigItemT
+FileRCT = conf_mod.FileRCT
+ResourceIDT = conf_mod.ResourceIDT
 
 
 def _expandrcpath(path: bytes) -> List[FileRCT]: