NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #2732 most downloaded on PyPI
Render Python type hints in Sphinx autodoc documentation
Latest stable
3.17.5
Last release 16 days ago
04 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
147 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
### Documentation - Update the README. 🐍 PyPI release 📜 Full Changelog
<a name="release-2-4-3-documentation"></a>
🐍 PyPI release 📜 Full Changelog
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix placement of the return type when the docstring has a doctest. #482 by @hoodmane.
<a name="release-2-4-1-fixed"></a>
Fix placement of the return type when the docstring has a doctest. 482 - by hoodmane.
### Features - Drop Python 3.9 support. - Add Python 3.13 support. 🐍 PyPI release 📜 Full Changelog
<a name="release-2-4-0-added"></a>
Drop Python 3.9 support.
Add Python 3.13 support.
Add the typehints_fixup_module_name option to rewrite module names. #474 by @hoodmane and @gaborbernat.
<a name="release-2-3-0-added"></a>
typehints_fixup_module_name option to rewrite module names. #474 by @hoodmane and @gaborbernat.Add the typehints_fixup_module_name option to rewrite module names. 474 - by hoodmane and gaborbernat.
Fix rendering when the docstring starts with a directive. #468 by @hoodmane.
<a name="release-2-2-3-fixed"></a>
Fix rendering when the docstring starts with a directive. 468 - by hoodmane.
Fix typehints_defaults = "braces-after" for a multiline :param: entry. #464 by @tikuma-lsuhsc and @gaborbernat.
<a name="release-2-2-2-fixed"></a>
typehints_defaults = "braces-after" for a multiline :param: entry. #464 by @tikuma-lsuhsc and @gaborbernat.Fix typehints_defaults = "braces-after" for a multiline :param: entry. 464 - by tikuma-lsuhsc and gaborbernat.
Avoid an exception for classes with a custom metaclass. #463 by @tikuma-lsuhsc.
<a name="release-2-2-1-fixed"></a>
Avoid an exception for classes with a custom metaclass. 463 - by tikuma-lsuhsc.
Look up aliases under the correct name. 463 - by tikuma-lsuhsc.
Keep aliased return types. 463 - by tikuma-lsuhsc.
Honor the autodoc_type_aliases configuration. #459 by @tikuma-lsuhsc.
<a name="release-2-2-0-added"></a>
autodoc_type_aliases configuration. #459 by @tikuma-lsuhsc.Honor the autodoc_type_aliases configuration. 459 - by tikuma-lsuhsc.
🐍 PyPI release 📜 Full Changelog
Support Sphinx 7.3; drop Python 3.8. #448 by @gaborbernat.
<a name="release-2-1-0-added"></a>
Support Sphinx 7.3; drop Python 3.8. 448 - by gaborbernat.
Ignore rst_prolog and rst_epilog when locating where to inject the return type. #445 by @caffeinepills and @gaborbernat.
<a name="release-2-0-1-fixed"></a>
rst_prolog and rst_epilog when locating where to inject the return type. #445 by @caffeinepills and @gaborbernat.<a name="release-2-0-1-documentation"></a>
Ignore rst_prolog and rst_epilog when locating where to inject the return type. 445 - by caffeinepills and gaborbernat.
Document a missing option in the README. 446 - by caffeinepills.
Add the always_use_bars_union option to render unions and optionals with |. It is on by default, hence the major version. #418 by @hoodmane.
Add the always_use_bars_union option to render unions and optionals with |. It is on by default, hence the major version. 418 - by hoodmane.
Stop docstring parsing from overwriting the Sphinx configuration. #422 by @flying-sheep.
<a name="release-1-25-3-fixed"></a>
Stop docstring parsing from overwriting the Sphinx configuration. 422 - by flying-sheep.
Make types in the signature respect typehints_fully_qualified. #400 by @hoodmane.
<a name="release-1-25-2-fixed"></a>
Make types in the signature respect typehints_fully_qualified. 400 - by hoodmane.
Put an escaped space between a cross-reference and its type arguments. #399 by @hoodmane.
<a name="release-1-25-1-fixed"></a>
Put an escaped space between a cross-reference and its type arguments. 399 - by hoodmane.
Wrap generated types in a sphinx_autodoc_typehints-type CSS class. #397 by @hoodmane.
<a name="release-1-25-0-added"></a>
Wrap generated types in a sphinx_autodoc_typehints-type CSS class. 397 - by hoodmane.
Evaluate nested type guards recursively. #393 by @Mr-Pepe and @gaborbernat.
<a name="release-1-24-1-fixed"></a>
Evaluate nested type guards recursively. 393 - by Mr-Pepe and gaborbernat.
Drop the typed-ast dependency. #373 by @gaborbernat.
<a name="release-1-24-0-packaging"></a>
typed-ast dependency. #373 by @gaborbernat.Drop the typed-ast dependency. 373 - by gaborbernat.
Nothing published for this version
Fix type guard handling for classes. #365 by @gaborbernat.
<a name="release-1-23-3-fixed"></a>
Fix type guard handling for classes. 365 - by gaborbernat.
Remove the dependency on itself from the package metadata. #361 by @0-wiz-0.
<a name="release-1-23-2-fixed"></a>
Remove the dependency on itself from the package metadata. 361 - by 0-wiz-0.
Add Python 3.12 support. #352 by @gaborbernat.
<a name="release-1-23-1-added"></a>
<a name="release-1-23-1-documentation"></a>
Add Python 3.12 support. 352 - by gaborbernat.
Fix a broken GitHub link in the README. 346 - by twmr.
Handle forward references in attrs classes. #345 by @znicholls.
<a name="release-1-23-0-added"></a>
Handle forward references in attrs classes. 345 - by znicholls.
Allow Sphinx to write in parallel. #317
ParamSpecArgs. #319Allow Sphinx to write in parallel. 317 - by marscher.
Fix crash when documenting ParamSpecArgs. 319 - by spacemanspiff2007.
Add line numbers to more docutils nodes so the return type lands in the right place. #316 by @hoodmane.
Add line numbers to more docutils nodes so the return type lands in the right place. 316 - by hoodmane.
Fix a constructor argument rendering with the wrong type when the class has an attribute with the same name. #309 by @hoodmane.
Fix a constructor argument rendering with the wrong type when the class has an attribute with the same name. 309 - by hoodmane.
Fix napoleon handling of numpy docstrings with no explicit return type. 311 - by hoodmane.
Fix a Field list ends without a blank line warning. #307 by @hoodmane.
<a name="release-1-21-6-fixed"></a>
Fix a Field list ends without a blank line warning. 307 - by hoodmane.
Find where the :rtype: field goes in more docstring layouts. #304 by @hoodmane.
<a name="release-1-21-5-fixed"></a>
Find where the :rtype: field goes in more docstring layouts. 304 - by hoodmane.
Improve the location of the return type. #300 by @hoodmane.
<a name="release-1-21-4-fixed"></a>
Improve the location of the return type. 300 - by hoodmane.
Use format_annotation to render class attribute type annotations. #299 by @hoodmane.
<a name="release-1-21-3-fixed"></a>
Use format_annotation to render class attribute type annotations. 299 - by hoodmane.
Fix overloads support. #297 by @hoodmane.
<a name="release-1-21-2-fixed"></a>
Fix spacing between :rtype: and directives. #294 by @jakelishman.
<a name="release-1-21-1-fixed"></a>
:rtype: and directives. #294 by @jakelishman.Fix spacing between :rtype: and directives. 294 - by jakelishman.
Handle collections.abc.Callable as well as typing.Callable. #289 by @hoodmane.
<a name="release-1-21-0-added"></a>
collections.abc.Callable as well as typing.Callable. #289 by @hoodmane.types module. #292 by @hoodmane.<a name="release-1-21-0-changes"></a>
<a name="release-1-21-0-fixed"></a>
Handle collections.abc.Callable as well as typing.Callable. 289 - by hoodmane.
Handle types from the types module. 292 - by hoodmane.
Put Literal arguments in code blocks. 288 - by hoodmane.
Remove the redundant return type for attributes. 287 - by hoodmane.
Put :rtype: before an examples or usage section. 290 - by hoodmane.
Render module _io as io. 291 - by hoodmane.
Use the data role for an Optional created from | None. #285 by @hoodmane.
<a name="release-1-20-2-fixed"></a>
Use the data role for an Optional created from | None. 285 - by hoodmane.
Show default values for parameters without type hints. #279 by @BhavyeMathur.
<a name="release-1-20-1-fixed"></a>
Show default values for parameters without type hints. 279 - by BhavyeMathur.
Add the typehints_use_signature and typehints_use_signature_return options. #278 by @BhavyeMathur.
<a name="release-1-20-0-added"></a>
typehints_use_signature and typehints_use_signature_return options. #278 by @BhavyeMathur.<a name="release-1-20-0-packaging"></a>
Add the typehints_use_signature and typehints_use_signature_return options. 278 - by BhavyeMathur.
Build with hatchling instead of setuptools.
Link the pyproject-api docs as an example of this extension. #267 by @ketozhang.
<a name="release-1-19-5-documentation"></a>
Link the pyproject-api docs as an example of this extension. 267 - by ketozhang.
Fix an IndexError for line and keyword split. #261 by @gaborbernat.
<a name="release-1-19-4-fixed"></a>
IndexError for line and keyword split. #261 by @gaborbernat.Fix an IndexError for line and keyword split. 261 - by gaborbernat.
Support typing.ParamSpec. #255 by @Numerlor.
Support typing.ParamSpec. 255 - by Numerlor.
Allow star prefixes for parameter names in docstrings. 254 - by Numerlor.
Use the data role only for annotations from the typing module. #250 by @Numerlor.
<a name="release-1-19-2-fixed"></a>
Use the data role only for annotations from the typing module. 250 - by Numerlor.
Support recursive type aliases. #248 by @hmc-cs-mdrissi.
<a name="release-1-19-1-added"></a>
Support recursive type aliases. 248 - by hmc-cs-mdrissi.
Support Python 3.11. #247 by @gaborbernat.
<a name="release-1-19-0-added"></a>
<a name="release-1-19-0-fixed"></a>
Optional when the default is None, as PEP 484 recommends. #247 by @gaborbernat.Support Python 3.11. 247 - by gaborbernat.
Stop adding Optional when the default is None, as PEP 484 recommends. 247 - by gaborbernat.
Support and require nptyping>=2.1.2. #235 by @gaborbernat.
<a name="release-1-18-3-added"></a>
nptyping>=2.1.2. #235 by @gaborbernat.Support and require nptyping>=2.1.2. 235 - by gaborbernat.
Support and require nptyping>=2.1.1. #232 by @gaborbernat.
<a name="release-1-18-2-added"></a>
nptyping>=2.1.1. #232 by @gaborbernat.Support and require nptyping>=2.1.1. 232 - by gaborbernat.
Fix mocked module import not working when used as guarded import.
<a name="release-1-18-1-fixed"></a>
Fix mocked module import not working when used as guarded import.
Support and require nptyping>=2.
<a name="release-1-18-0-added"></a>
nptyping>=2.UnionType.Support and require nptyping>=2.
Handle UnionType.
@kianmeng made their first contribution in #224
<a name="release-1-17-1-packaging"></a>
nptyping<2.Add the typehints_use_rtype option.
<a name="release-1-17-0-added"></a>
typehints_use_rtype option.<a name="release-1-17-0-fixed"></a>
TypeError when getting source code via inspect.Add the typehints_use_rtype option.
Handle TypeError when getting source code via inspect.
Support type subscriptions with multiple elements where one or more elements are tuples, such as nptyping.NDArray[(Any, ...), nptyping.Float].
<a name="release-1-16-0-added"></a>
nptyping.NDArray[(Any, ...), nptyping.Float].TypeVar.... to Ellipsis through intersphinx.<a name="release-1-16-0-fixed"></a>
nptyping.Float[64].Support type subscriptions with multiple elements where one or more elements are tuples, such as nptyping.NDArray[(Any, ...), nptyping.Float].
Resolve forward references.
Expand and better handle TypeVar.
Link ... to Ellipsis through intersphinx.
Fix arbitrary types accepting singleton subscriptions, such as nptyping.Float[64].
Stop descending into inner blocks that contain if TYPE_CHECKING.
<a name="release-1-15-3-fixed"></a>
if TYPE_CHECKING.Stop descending into inner blocks that contain if TYPE_CHECKING.
Log a warning instead of crashing when a type guard import fails to resolve.
<a name="release-1-15-2-fixed"></a>
Log a warning instead of crashing when a type guard import fails to resolve.
Do nothing instead of crashing when resolving type guard imports of a module without source code, such as a C extension.
Rename fully_qualified to typehints_fully_qualified.
<a name="release-1-15-1-breaking-changes"></a>
fully_qualified to typehints_fully_qualified.Rename fully_qualified to typehints_fully_qualified.
Add the typehints_formatter option to configure the formatting function.
<a name="release-1-15-0-added"></a>
typehints_formatter option to configure the formatting function.<a name="release-1-15-0-fixed"></a>
inspect module returns invalid Python source.<a name="release-1-15-0-removed"></a>
set_type_checking_flag option, as this is now done by default.Add the typehints_formatter option to configure the formatting function.
Resolve type guard imports before evaluating annotations for objects.
Fix crash when the inspect module returns invalid Python source.
Remove the set_type_checking_flag option, as this is now done by default.
Fix normalize_source_lines() breaking the indentation of methods with decorators whose parameters start with def.
<a name="release-1-14-1-fixed"></a>
normalize_source_lines() breaking the indentation of methods with decorators whose parameters start with def.ValueError or TypeError raised when the signature of an object cannot be determined.KeyError when an argument is not documented, such as cls for class methods and self for methods.Fix normalize_source_lines() breaking the indentation of methods with decorators whose parameters start with def.
Handle ValueError or TypeError raised when the signature of an object cannot be determined.
Fix KeyError when an argument is not documented, such as cls for class methods and self for methods.
Add the typehints_defaults option to annotate parameter defaults.
<a name="release-1-14-0-added"></a>
typehints_defaults option to annotate parameter defaults.Add the typehints_defaults option to annotate parameter defaults.
Fix NewType inserting a reference as first argument instead of a string.
<a name="release-1-13-1-fixed"></a>
NewType inserting a reference as first argument instead of a string.Fix NewType inserting a reference as first argument instead of a string.
Allow Python 3.10 style annotations (PEP 563).
<a name="release-1-13-0-added"></a>
Drop Python 3.6 support.
Add Python 3.10 support.
Normalize async functions.
Allow Python 3.10 style annotations (PEP 563).
Add the simplify_optional_unions option.
<a name="release-1-12-0-added"></a>
simplify_optional_unions option.<a name="release-1-12-0-fixed"></a>
Drop Python 3.5 support.
Add the simplify_optional_unions option.
Fix indentation of multiline strings.
Point None to the Python stdlib docs.
<a name="release-1-11-1-fixed"></a>
None to the Python stdlib docs.Point None to the Python stdlib docs.
Update special dataclass handling.
One column per quarter.