File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
src/sphinx_codeautolink/extension Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ These release notes are based on
88sphinx-codeautolink adheres to
99`Semantic Versioning <https://semver.org >`_.
1010
11+ Unreleased
12+ ----------
13+ - Fix regression in not handling malformed return types (:issue: `159 `)
14+
11150.16.1 (2025-01-15)
1216-------------------
1317- Fix regression in not handling invalid return type hints (:issue: `158 `)
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def get_return_annotation(func: Callable) -> type | None:
120120 """Determine the target of a function return type hint."""
121121 try :
122122 annotation = get_type_hints (func ).get ("return" )
123- except NameError as e :
123+ except ( NameError , TypeError ) as e :
124124 msg = f"Unable to follow return annotation of { get_name_for_debugging (func )} ."
125125 raise CouldNotResolve (msg ) from e
126126
Original file line number Diff line number Diff line change 1+ numpy
2+ np.concatenate
3+ # split
4+ extensions = [
5+ "sphinx.ext.intersphinx",
6+ "sphinx_codeautolink",
7+ ]
8+ intersphinx_mapping = {"numpy": ("https://numpy.org/doc/stable/", None)}
9+ codeautolink_warn_on_failed_resolve = False
10+ # split
11+ Test project
12+ ============
13+
14+ .. code:: python
15+
16+ import numpy as np
17+
18+ np.concatenate().mean()
You can’t perform that action at this time.
0 commit comments