Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / docs / sphinx / fakedbusdoc.py
blobd2c5079046542998bc9c15d5335378f88eb0a5c7
1 # D-Bus XML documentation extension, compatibility gunk for <sphinx4
3 # Copyright (C) 2021, Red Hat Inc.
5 # SPDX-License-Identifier: LGPL-2.1-or-later
7 # Author: Marc-André Lureau <marcandre.lureau@redhat.com>
8 """dbus-doc is a Sphinx extension that provides documentation from D-Bus XML."""
10 from docutils.parsers.rst import Directive
11 from sphinx.application import Sphinx
12 from typing import Any, Dict
15 class FakeDBusDocDirective(Directive):
16 has_content = True
17 required_arguments = 1
19 def run(self):
20 return []
23 def setup(app: Sphinx) -> Dict[str, Any]:
24 """Register a fake dbus-doc directive with Sphinx"""
25 app.add_directive("dbus-doc", FakeDBusDocDirective)