- Allow Sphinx explicitly to write in parallel.
- Fixed crash when documenting ParamSpecArgs
-
Fixed a bug where if a class has an attribute and a constructor argument with the same name, the constructor argument type would be rendered incorrectly (issue 308)
-
Fixed napoleon handling of numpy docstrings with no specified return type.
- Fix a
Field list ends without a blank line
warning (issue 305).
- More robust determination of rtype location / fix issue 302
- Improvements to the location of the return type
- Use format_annotation to render class attribute type annotations
- Fix overloads support
- Fix spacing between
:rtype:
and directives
- Handle types from types module
- If module is _io, use io instead
- Put rtype before examples or usage section
- Remove redundant return type for attributes
- Handle collections.abc.Callable as well as typing.Callable
- Put Literal args in code blocks
- Fix Optional role to be data.
- Fixed default options not displaying for parameters without type hints.
- Use hatchling instead of setuptools
- Add support for typing.ParamSpec
- Allow star prefixes for parameter names in docstring
- Fix incorrect domain used for collections.abc.Callable.
- Fix bug for recursive type alias.
- Support for CPython 3.11, no longer adds
Optional
when the argument is default per recommendation from PEP-484.
- Support and require
nptyping>=2.1.2
- Support and require
nptyping>=2.1.1
- Fix mocked module import not working when used as guarded import
- Support and require
nptyping>=2
- Handle
UnionType
- Mark it as requiring
nptyping<2
- Add
typehints_use_rtype
option - Handles
TypeError
when getting source code via inspect
- Add support for type subscriptions with multiple elements, where one or more elements are tuples; e.g.,
nptyping.NDArray[(Any, ...), nptyping.Float]
- Fix bug for arbitrary types accepting singleton subscriptions; e.g.,
nptyping.Float[64]
- Resolve forward references
- Expand and better handle
TypeVar
- Add intershpinx reference link for
...
toEllipsis
(as is just an alias)
- Prevents reaching inner blocks that contains
if TYPE_CHECKING
- Log a warning instead of crashing when a type guard import fails to resolve
- When resolving type guard imports if the target module does not have source code (such is the case for C-extension modules) do nothing instead of crashing
- Fix
fully_qualified
should betypehints_fully_qualified
- Resolve type guard imports before evaluating annotations for objects
- Remove
set_type_checking_flag
flag as this is now done by default - Fix crash when the
inspect
module returns an invalid python syntax source - Made formatting function configurable using the option
typehints_formatter
- Fixed
normalize_source_lines()
messing with the indentation of methods with decorators that have parameters starting withdef
. - Handle
ValueError
orTypeError
being raised when signature of an object cannot be determined - Fix
KeyError
being thrown when argument is not documented (e.g.cls
argument for class methods, andself
for methods)
- Added
typehints_defaults
config option allowing to automatically annotate parameter defaults.
- Fixed
NewType
inserts a reference as first argument instead of a string
- Dropped Python 3.6 support
- Python 3.10 support
- Normalize async functions properly
- Allow py310 style annotations (PEP-563)
- Dropped Python 3.5 support
- Added the simplify_optional_unions config option (PR by tillhainbach)
- Fixed indentation of multiline strings (PR by Yuxin Wu)
- Changed formatting of
None
to point to the Python stdlib docs (PR by Dominic Davis-Foster) - Updated special dataclass handling (PR by Lihu Ben-Ezri-Ravin)
- Dropped support for Sphinx < 3.0
- Added support for alternative parameter names (
arg
,argument
,parameter
) - Fixed import path for Signature (PR by Matthew Treinish)
- Fixed
TypeError
when formatting a parametrizedtyping.IO
annotation - Fixed data class displaying a return type in its
__init__()
method
- Fixed
TypeError
(or wrong rendered class name) when an annotation is a generic class that has aname
property
- Fixed inner classes missing their parent class name(s) when rendered
- Fixed
KeyError
when encountering mocked annotations (autodoc_mock_imports
)
- Rewrote the annotation formatting logic (fixes Python 3.5.2 compatibility regressions and an
AttributeError
regression introduced in v1.9.0) - Fixed decorator classes not being processed as classes
- Added support for typing_extensions
- Added the
typehints_document_rtype
option (PR by Simon-Martin Schröder) - Fixed metaclasses as annotations causing
TypeError
- Fixed rendering of
typing.Literal
- Fixed OSError when generating docs for SQLAlchemy mapped classes
- Fixed unparametrized generic classes being rendered with their type parameters (e.g.
Dict[~KT, ~VT]
)
- Fixed regression which caused
TypeError
orOSError
when trying to set annotations due to PR #87 - Fixed unintentional mangling of annotation type names
- Added proper
:py:data
targets forNoReturn
,ClassVar
andTuple
- Added support for inline type comments (like
(int, str) -> None
) (PR by Bernát Gábor) - Use the native AST parser for type comment support on Python 3.8+
- Dropped support for Python 3.4
- Fixed unwrapped local functions causing errors (PR by Kimiyuki Onaka)
- Fixed
AttributeError
when documenting the__init__()
method of a data class - Added support for type hint comments (PR by Markus Unterwaditzer)
- Added flag for rendering classes with their fully qualified names (PR by Holly Becker)
- Fixed
TypeError
when formatting annotations from a class that inherits from a concrete generic type (report and tests by bpeake-illuscio) - Added support for
typing_extensions.Protocol
(PR by Ian Good) - Added support for
typing.NewType
(PR by George Leslie-Waksman)
- Emit a warning instead of crashing when an unresolvable forward reference is encountered in type annotations
- Fixed escape characters in parameter default values getting lost during signature processing
- Replaced use of the
config-inited
event (which inadvertently required Sphinx 1.8) with thebuilder-inited
event
- The setting of the
typing.TYPECHECKING
flag is now configurable using theset_type_checking_flag
option
- The extension now sets
typing.TYPECHECKING
toTrue
during setup to include conditional imports which may be used in type annotations - Fixed parameters with trailing underscores (PR by Daniel Knell)
- Fixed KeyError with private methods (PR by Benito Palacios Sánchez)
- Fixed deprecation warning about the use of formatargspec (PR by Y. Somda)
- The minimum Sphinx version is now v1.7.0
- Fixed rendering of generic types outside the typing module (thanks to Tim Poterba for the PR)
- Fixed crash when processing docstrings from nested classes (thanks to dilyanpalauzov for the fix)
- Added support for Python 3.7
- Dropped support for Python 3.5.0 and 3.5.1
- Ensured that
:rtype:
doesn't get joined with a paragraph of text (thanks to Bruce Merry for the PR)
- Removed support for
backports.typing
as it has been removed from the PyPI - Fixed first parameter being cut out from class methods and static methods (thanks to Josiah Wolf Oberholtzer for the PR)
- Fixed
process_signature()
clobbering any explicitly overridden signatures from the docstring
- Explicitly prefix
:class:
,:mod:
et al with:py:
, in casepy
is not the default domain of the project (thanks Monty Taylor)
- Fixed
ValueError` when
getargspec()`` encounters a built-in function - Fixed
AttributeError
whenAny
is combined with another type in aUnion
(thanks Davis Kirkendall)
- Fixed compatibility with Python 3.6 and 3.5.3
- Fixed
NameError
when processing signatures of wrapped functions with type hints - Fixed handling of slotted classes with no
__init__()
method - Fixed Sphinx warning about parallel reads
- Fixed return type being added to class docstring from its
__init__()
method (thanks to Manuel Krebber for the patch) - Fixed return type hints of
@property
methods being omitted (thanks to pknight for the patch) - Added a test suite (thanks Manuel Krebber)
- Added proper support for
typing.Tuple
(pull request by Manuel Krebber)
- Fixed wrong placement of
:rtype:
if a multi-line:param:
or a:returns:
is used
- Fixed coroutine functions' signatures not being processed when using sphinxcontrib-asyncio
- Fixed compatibility with Sphinx 1.4
- Fixed "self" parameter not being removed from exception class constructor signatures
- Fixed process_signature() erroneously removing the first argument of a static method
- Fixed exception classes not being processed like normal classes
- Fixed errors caused by forward references not being looked up with the right globals
- Initial release