Mercurial > hg-stable
view pyproject.toml @ 49907:58dff81ffba1
typing: add type hints to the common posix/windows platform functions
These are done in sync because some platforms have empty implementations, and it
isn't obvious what the types should be without examining the other. We want the
types aligned, so @overload definitions that differ aren't generated. The only
differences here are the few methods that unconditionally raise an error are
marked as `NoReturn`, which doesn't seem to bother pytype.
A couple of the posix module functions needed to be updated with a modern
ternary operator, because pytype seems to want to use the type of the second
object in the old `return x and y` style.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 16 Dec 2022 00:54:39 -0500 |
parents | 58fe6d127a01 |
children | d4b275587847 |
line wrap: on
line source
[build-system] requires = ["setuptools", "wheel"] [tool.black] line-length = 80 exclude = ''' build/ | wheelhouse/ | dist/ | packages/ | \.hg/ | \.mypy_cache/ | \.venv/ | mercurial/thirdparty/ ''' skip-string-normalization = true quiet = true