--- 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):