|
15 | 15 | # |
16 | 16 | # The full version, including alpha/beta/rc tags. |
17 | 17 | # The short X.Y version. |
| 18 | +from __future__ import annotations |
| 19 | + |
18 | 20 | import os |
19 | 21 | from pathlib import Path |
20 | 22 | import shutil |
21 | 23 | from textwrap import dedent |
22 | 24 | from typing import TYPE_CHECKING |
23 | 25 |
|
24 | | -from _pytest import __version__ as version |
| 26 | +from _pytest import __version__ as full_version |
| 27 | + |
25 | 28 |
|
| 29 | +version = full_version.split("+")[0] |
26 | 30 |
|
27 | 31 | if TYPE_CHECKING: |
28 | 32 | import sphinx.application |
|
189 | 193 | ("py:class", "SubRequest"), |
190 | 194 | ("py:class", "TerminalReporter"), |
191 | 195 | ("py:class", "_pytest._code.code.TerminalRepr"), |
| 196 | + ("py:class", "TerminalRepr"), |
192 | 197 | ("py:class", "_pytest.fixtures.FixtureFunctionMarker"), |
193 | 198 | ("py:class", "_pytest.logging.LogCaptureHandler"), |
194 | 199 | ("py:class", "_pytest.mark.structures.ParameterSet"), |
|
210 | 215 | ("py:class", "_PluggyPlugin"), |
211 | 216 | # TypeVars |
212 | 217 | ("py:class", "_pytest._code.code.E"), |
| 218 | + ("py:class", "E"), # due to delayed annotation |
213 | 219 | ("py:class", "_pytest.fixtures.FixtureFunction"), |
214 | 220 | ("py:class", "_pytest.nodes._NodeType"), |
| 221 | + ("py:class", "_NodeType"), # due to delayed annotation |
215 | 222 | ("py:class", "_pytest.python_api.E"), |
216 | 223 | ("py:class", "_pytest.recwarn.T"), |
217 | 224 | ("py:class", "_pytest.runner.TResult"), |
218 | 225 | ("py:obj", "_pytest.fixtures.FixtureValue"), |
219 | 226 | ("py:obj", "_pytest.stash.T"), |
| 227 | + ("py:class", "_ScopeName"), |
220 | 228 | ] |
221 | 229 |
|
222 | 230 |
|
|
455 | 463 | } |
456 | 464 |
|
457 | 465 |
|
458 | | -def setup(app: "sphinx.application.Sphinx") -> None: |
| 466 | +def setup(app: sphinx.application.Sphinx) -> None: |
459 | 467 | app.add_crossref_type( |
460 | 468 | "fixture", |
461 | 469 | "fixture", |
|
0 commit comments