Skip to content

Commit 85f436f

Browse files
committed
Use safer version of mro (#120)
1 parent 35fefe2 commit 85f436f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/src/release_notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sphinx-codeautolink adheres to
1111
Unreleased
1212
----------
1313
- Fix linking blocks with line numbers (:issue:`137`)
14+
- Use safer version of ``mro`` to support ``type`` (:issue:`120`)
1415

1516
0.15.0 (2023-02-05)
1617
-------------------

src/sphinx_codeautolink/extension/resolve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def locate_type(cursor: Cursor, components: Tuple[str, ...], inventory) -> Curso
8383
pass
8484

8585
if isclass(previous.value) and cursor.location not in inventory:
86-
for val in previous.value.mro():
86+
for val in previous.value.__mro__:
8787
name = fully_qualified_name(val)
8888
if name + "." + component in inventory:
8989
previous.location = name

0 commit comments

Comments
 (0)