decohints is a Python library that provides a decorator to help IDEs like PyCharm correctly display the parameter hints for functions wrapped by other decorators. It addresses a common pain point in Python development by preserving the original function's signature for better developer experience and type checking. The current version is 1.0.9, and it maintains an active release cadence.
pip install decohintsVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use `decohints` to wrap your own decorator. When `my_simple_decorator` is decorated with `@decohints`, IDEs like PyCharm will correctly show the parameter hints of the `greet` function (`name: str, age: int`) instead of the generic `*args, **kwargs`.
Place `@decohints` at the very top of your decorator definition. Example: `@decohints\n@another_decorator\ndef your_decorator(): ...`
Upgrade to `decohints` version 1.0.5 or newer (`pip install --upgrade decohints`). This version includes the necessary `py.typed` marker for proper static analysis.
Apply the `@decohints` decorator to your custom decorator function. For instance, if you have `def my_decorator():`, change it to `@decohints\ndef my_decorator():`.
Upgrade `decohints` to version 1.0.5 or later using `pip install --upgrade decohints`. This version includes the `py.typed` marker, enabling Mypy to correctly analyze the library.
No dependency data recorded yet.