diff -r 2e9e62242451 -r 278af66e6595 mercurial/formatter.py --- a/mercurial/formatter.py Tue Jul 23 19:14:16 2024 -0400 +++ b/mercurial/formatter.py Tue Jul 23 19:20:22 2024 -0400 @@ -110,6 +110,7 @@ import itertools import os import pickle +import typing from .i18n import _ from .node import ( @@ -118,6 +119,11 @@ ) from .thirdparty import attr +# Force pytype to use the non-vendored package +if typing.TYPE_CHECKING: + # noinspection PyPackageRequirements + import attr + from . import ( error, pycompat,