--- id: types-decorator version: "5.2.0.20260712" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-decorator — Typing stubs for decorator License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does This package is a type stub—a collection of type annotations without runtime code—that teaches type checkers how to understand the `decorator` library. When you install it alongside `decorator` version 5.2.x, tools like mypy and pyright can now check your code for type errors when you use decorators, catching mistakes before runtime. The stubs are maintained as part of the typeshed project, a centralized repository of type information for popular Python packages. However, this stub is primarily useful for older versions of `decorator`. Since `decorator` version 5.3.0, the package includes its own type annotations, making this stub redundant. If you are already using `decorator` 5.3.0 or later, you should uninstall `types-decorator` and rely on the built-in types instead. Use it for: - Type-checking code that uses `decorator` 5.2.x with mypy or pyright in a CI/CD pipeline. - Enabling IDE autocomplete and type hints for decorator patterns in projects locked to `decorator` 5.2.x. - Validating decorator-based function wrappers in a codebase before upgrading to newer `decorator` versions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for the `decorator` package, enabling type checkers like mypy and pyright to validate code that uses decorator patterns without runtime overhead. Yes, if you are using `decorator` version 5.2.x and want type checking support. No, if you are already on `decorator` 5.3.0 or later—uninstall this stub and use the built-in types instead. The package is actively maintained and has no known vulnerabilities, but its utility is narrowly scoped to a specific decorator version range. ## Install pip install types-decorator uv add types-decorator poetry add types-decorator ## Installing types-decorator Before you install: Low friction install with no runtime dependencies. Actively maintained as part of typeshed; last release 33 days ago. Note: the `decorator` package itself includes type annotations since version 5.3.0, making this stub package redundant for newer decorator versions. License in practice: Apache-2.0 permissive license; no restrictions on use, modification, or distribution in most contexts. Quickstart: pip install types-decorator # Then use decorator in your code; type checkers will now understand its types import decorator @decorator.decorator def my_decorator(func, *args, **kwargs): return func(*args, **kwargs) Requires Python 3.10 or later. Only useful if you are using `decorator` version 5.2.x; decorator 5.3.0+ includes its own type annotations and this stub is not needed. Verify before relying: - Whether mypy 2.2.0 and pyright 1.1.411 represent current or outdated versions of those type checkers. - Whether there are known issues or gaps in type coverage beyond what the typeshed commit hash documents. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs for decorator, decorator type hints, mypy decorator annotations, pyright decorator types, typing stubs typeshed, type-stubs, typeshed [View on SkillFed](https://skillfed.io/packages/types-decorator) · [View on PyPI](https://pypi.org/project/types-decorator/)