types-unidiff
Typing stubs for unidiff
What it is and what it does
types-unidiff is a type stub package that provides type hints for the unidiff library, which parses unified diff format files. It is part of the typeshed project and allows static type checkers like mypy and pyright to understand and validate code that uses unidiff. The stubs target unidiff 0.7.x specifically and have been tested against mypy 2.3.0 and pyright 1.1.411.
This package is a stub-only distribution with no runtime dependencies, so it adds no overhead to your environment. However, it is primarily useful for developers still on unidiff 0.7.x; the unidiff package itself has included type annotations since version 1.0.0, making this stub package redundant for newer versions.
Use it for:
- Enable mypy or pyright to type-check code that parses unified diff files with unidiff 0.7.x
- Catch type errors in diff-parsing workflows before runtime in CI/CD pipelines
- Provide IDE autocomplete and inline type hints for unidiff API calls in editors like VS Code
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the unidiff package, enabling static type checkers like mypy and pyright to validate code that uses unidiff for parsing unified diff format files.
Yes, if you are using unidiff 0.7.x and rely on static type checking. Install it alongside unidiff 0.7.* to get full type support. No, if you are already on unidiff 1.0.0 or newer—uninstall this package and use unidiff's built-in type annotations instead. The package is actively maintained and has no known vulnerabilities.
Install
types-unidiff on PyPI
pip
pip install types-unidiffuv
uv add types-unidiffpoetry
poetry add types-unidiffInstalling types-unidiff
Before you install
Low install friction with no runtime dependencies. Actively maintained as part of typeshed; released 18 days ago. Note that unidiff 1.0.0+ includes its own type annotations, making this package unnecessary for newer unidiff versions.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most projects without significant legal constraints.
Quickstart
pip install types-unidiff
# Then use unidiff normally; type checkers will now understand its types
import unidiff
patch = unidiff.PatchSet.from_filename('changes.patch')
Requires Python 3.10 or later. Only useful if you are using unidiff 0.7.x; unidiff 1.0.0+ includes its own type stubs.
Verify before relying
- Whether this package is still needed if you are already using unidiff 1.0.0 or newer (description suggests it should be uninstalled in that case)
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,676/month — #12,855 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_unidiff-0.7.0.20260727-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
unidiffParses unified diff format data into structured…
permissive · top 1,000 on PyPI
unidiff2Parses unified diff format into structured…
permissive · top 15,000 on PyPI
types-boltonsProvides type stubs for the boltons library,…
permissive · top 15,000 on PyPI
types-MarkdownProvides type stubs for the Markdown package,…
permissive · top 5,000 on PyPI
types-pytzProvides type stubs for the pytz timezone…
permissive · top 1,000 on PyPI
types-httplib2Provides type stubs for the httplib2 HTTP…
permissive · top 5,000 on PyPI
types-sixProvides type hints for the six Python 2/3…
permissive · top 5,000 on PyPI
types-regexProvides type annotations for the regex…
permissive · top 5,000 on PyPI