interfaces: direct import the basetypes into the `types` module
This is equivalent code, but PyCharm fails to propagate the doc comments to
tooltips in client modules that import from `types` with the previous aliasing.
--- a/mercurial/interfaces/types.py Thu Feb 06 15:17:37 2025 -0500
+++ b/mercurial/interfaces/types.py Thu Feb 06 15:24:58 2025 -0500
@@ -11,13 +11,14 @@
from __future__ import annotations
+from ._basetypes import (
+ FsPathT,
+ HgPathT,
+ UserMsgT,
+)
+
from . import (
- _basetypes,
matcher,
)
MatcherT = matcher.IMatcher
-
-UserMsgT = _basetypes.UserMsgT
-HgPathT = _basetypes.HgPathT
-FsPathT = _basetypes.FsPathT
--- a/tests/test-check-pyflakes.t Thu Feb 06 15:17:37 2025 -0500
+++ b/tests/test-check-pyflakes.t Thu Feb 06 15:24:58 2025 -0500
@@ -20,6 +20,9 @@
> 2>/dev/null \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
contrib/perf.py:*:* undefined name 'xrange' (glob) (?)
+ mercurial/interfaces/types.py:*:*: '._basetypes.FsPathT' imported but unused (glob)
+ mercurial/interfaces/types.py:*:*: '._basetypes.HgPathT' imported but unused (glob)
+ mercurial/interfaces/types.py:*:*: '._basetypes.UserMsgT' imported but unused (glob)
mercurial/pycompat.py:*:* 'codecs' imported but unused (glob)
mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob)
mercurial/pycompat.py:*:* 'http.client as httplib' imported but unused (glob)