typing: import unconditionally
This is needed if we're writing python3 signatures.
--- 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')