mercurial/error.py
changeset 51285 9d3721552b6c
parent 50660 bf16ef96defe
child 51286 81224afd938d
--- a/mercurial/error.py	Wed Nov 08 01:58:16 2023 +0100
+++ b/mercurial/error.py	Wed Dec 20 12:51:20 2023 +0100
@@ -14,19 +14,30 @@
 
 import difflib
 
+from typing import (
+    Any,
+    AnyStr,
+    Iterable,
+    List,
+    Optional,
+    Sequence,
+    Union,
+)
+
 # Do not import anything but pycompat here, please
 from . import pycompat
 
-if pycompat.TYPE_CHECKING:
-    from typing import (
-        Any,
-        AnyStr,
-        Iterable,
-        List,
-        Optional,
-        Sequence,
-        Union,
-    )
+
+# keeps pyflakes happy
+assert [
+    Any,
+    AnyStr,
+    Iterable,
+    List,
+    Optional,
+    Sequence,
+    Union,
+]
 
 
 def _tobytes(exc):