typing: import unconditionally
authorArseniy Alekseyev <aalekseyev@janestreet.com>
Mon, 16 Jan 2023 12:10:20 +0000
changeset 49979 15175774e1c5
parent 49978 cd125eef4388
child 49980 7623d79f872c
typing: import unconditionally This is needed if we're writing python3 signatures.
mercurial/pathutil.py
--- 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')