Skip to content

Commit 8070809

Browse files
committed
docs(pytest-plugin[types]): Register CreateRepoFn and CreateRepoPostInitFn for cross-referencing
why: The fixture summary table rendered return types like `CreateRepoFn` as plain text instead of hyperlinks. sphinx_autodoc_pytest_fixtures emits :class:`~libvcs.pytest_plugin.CreateRepoFn` for every fixture returning that type, but Sphinx silently degrades to plain text when the name is absent from the Python domain's object index — which it was, since the Protocol classes had no autoclass directive anywhere. what: - Add a "Types" section to docs/api/pytest-plugin.md with autoclass directives for CreateRepoFn and CreateRepoPostInitFn - Use :special-members: __call__ to expose the callback contract - Use :exclude-members: __init__, _abc_impl, _is_protocol to suppress Protocol internals surfaced by gp-sphinx's global autodoc defaults (private-members: True, autodoc_class_signature: "separated")
1 parent 0e3f63c commit 8070809

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/api/pytest-plugin.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ def setup(
4141
pass
4242
```
4343
:::
44+
45+
## Types
46+
47+
```{eval-rst}
48+
.. autoclass:: libvcs.pytest_plugin.CreateRepoFn
49+
:special-members: __call__
50+
:exclude-members: __init__, _abc_impl, _is_protocol
51+
52+
.. autoclass:: libvcs.pytest_plugin.CreateRepoPostInitFn
53+
:special-members: __call__
54+
:exclude-members: __init__, _abc_impl, _is_protocol
55+
```

0 commit comments

Comments
 (0)