Skip to content

Commit b46c8d6

Browse files
authored
Apply suggestions from code review
Fixing version checks, the warning came in v9.0
1 parent 24920e7 commit b46c8d6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sphinx_automodapi/smart_resolver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from docutils.nodes import literal, reference
1717

18-
from .utils import SPHINX_LT_10
18+
from .utils import SPHINX_LT_9
1919

2020
__all__ = []
2121

@@ -112,7 +112,7 @@ def missing_reference_handler(app, env, node, contnode):
112112

113113
if ('py:class' in inventory[prefix] and
114114
reftarget in inventory[prefix]['py:class']):
115-
if SPHINX_LT_10:
115+
if SPHINX_LT_9:
116116
newtarget = inventory[prefix]['py:class'][reftarget][2]
117117
else:
118118
newtarget = inventory[prefix]['py:class'][reftarget].uri

sphinx_automodapi/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'find_autosummary_in_lines_for_automodsumm']
1414

1515
SPHINX_LT_9 = Version(sphinx.__version__) < Version("9.0")
16-
SPHINX_LT_10 = Version(sphinx.__version__) < Version("10.0.dev")
1716

1817
# We use \n instead of os.linesep because even on Windows, the generated files
1918
# use \n as the newline character.

0 commit comments

Comments
 (0)