view mercurial/interfaces/types.py @ 52766:4eede65d68cf

lint: add comments for disabling unused import warnings where appropriate As mentioned in the previous commit, this doesn't actually placate `pyflakes`. But it does cause PyCharm to not show the imports as greyed out, so presumably it helps other IDEs too.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 06 Feb 2025 20:43:34 -0500
parents 2a5450ecde20
children ae2848198462
line wrap: on
line source

# mercurial/interfaces/types.py - type alias for interfaces
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
#
# This is the main entry point for Mercurial code writing type annotations.
#
# The general principle can be summarized when dealing with <FooBar> object:
# - to type your code: use FooBarT from `mercurial.interface.types`
# - to subclass <FooBar>: use IFooBar from `mercurial.interface.foo_bar`

from __future__ import annotations

from ._basetypes import (  # noqa: F401 (ignore imported but not used)
    FsPathT,
    HgPathT,
    UserMsgT,
)

from . import (
    matcher,
)

MatcherT = matcher.IMatcher