changeset 49906:15175774e1c5

typing: import unconditionally This is needed if we're writing python3 signatures.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Mon, 16 Jan 2023 12:10:20 +0000
parents cd125eef4388
children 7623d79f872c
files mercurial/pathutil.py
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/pathutil.py	Wed Jan 11 17:51:04 2023 +0400
+++ b/mercurial/pathutil.py	Mon Jan 16 12:10:20 2023 +0000
@@ -4,6 +4,13 @@
 import posixpath
 import stat
 
+from typing import (
+    Any,
+    Callable,
+    Iterator,
+    Optional,
+)
+
 from .i18n import _
 from . import (
     encoding,
@@ -13,15 +20,6 @@
     util,
 )
 
-if pycompat.TYPE_CHECKING:
-    from typing import (
-        Any,
-        Callable,
-        Iterator,
-        Optional,
-    )
-
-
 rustdirs = policy.importrust('dirstate', 'Dirs')
 parsers = policy.importmod('parsers')