Mercurial > public > mercurial-scm > hg
view mercurial/interfaces/types.py @ 52750:2a5450ecde20
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 06 Feb 2025 15:24:58 -0500 |
parents | fecda9f44e57 |
children | 4eede65d68cf |
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 ( FsPathT, HgPathT, UserMsgT, ) from . import ( matcher, ) MatcherT = matcher.IMatcher