mercurial/utils/stringutil.py
changeset 51725 278af66e6595
parent 51699 ca7bde5dbafb
child 51828 4eccb65e444f
--- a/mercurial/utils/stringutil.py	Tue Jul 23 19:14:16 2024 -0400
+++ b/mercurial/utils/stringutil.py	Tue Jul 23 19:20:22 2024 -0400
@@ -13,6 +13,7 @@
 import re as remod
 import textwrap
 import types
+import typing
 
 from typing import (
     Optional,
@@ -22,6 +23,11 @@
 from ..i18n import _
 from ..thirdparty import attr
 
+# Force pytype to use the non-vendored package
+if typing.TYPE_CHECKING:
+    # noinspection PyPackageRequirements
+    import attr
+
 from .. import (
     encoding,
     error,