Skip to main content

Hints your function with an existing one.

Project description

hintwith

Hints your function with an existing one.

Installation

$ pip install hintwith

Usage

Use hintwith() to annotate a function with another one's annotations:

>>> from hintwith import hintwith
>>> def a(x: int, y: int, z: int = 0) -> int:
...     """Sums x, y and z."""
...     return x + y + z
... 
>>> @hintwith(a)
... def b(*args, **kwargs) -> float:
...     return float(a(*args, **kwargs))
... 

Also, there is hintwithmethod() to annotate the function with a method rather than another function.

See Also

Github repository

PyPI project

License

This project falls under the BSD 3-Clause License.

v0.1.0

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hintwith-0.1.0-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file hintwith-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: hintwith-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for hintwith-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c3b6fd02ce04a1b4ef99908bb643653106496ff0c18add2547c229e7f2906c03
MD5 c05a81671136406f9a43534a3a78bc24
BLAKE2b-256 ee2eb74377098e5f409370020661ce3f49e663b9613bba5bcb63eddf48e08982

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page