././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1668267378.558643 sphinx_qt_documentation-0.4.1/0000755000175000017500000000000000000000000017457 5ustar00czakigrzegorz00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1627079453.0 sphinx_qt_documentation-0.4.1/LICENSE.txt0000664000175000017500000000266400000000000021314 0ustar00czakigrzegorz00000000000000Copyright 2020 Grzegorz Bokota Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1627079453.0 sphinx_qt_documentation-0.4.1/MANIFEST.in0000664000175000017500000000004600000000000021217 0ustar00czakigrzegorz00000000000000include README.md include LICENSE.txt ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1668267378.558643 sphinx_qt_documentation-0.4.1/PKG-INFO0000644000175000017500000000556200000000000020564 0ustar00czakigrzegorz00000000000000Metadata-Version: 2.1 Name: sphinx_qt_documentation Version: 0.4.1 Summary: Plugin for proper resolve intersphinx references for Qt elements Home-page: https://github.com/Czaki/sphinx-qt-documentation Author: Grzegorz Bokota Author-email: bokota@gmail.com License: BSD-3-Clause Keywords: Sphinx,Qt,PyQt5,PySide2,PyQt6,PySide6 Platform: Linux Platform: Windows Platform: MacOs Classifier: Development Status :: 3 - Alpha Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: dev Provides-Extra: lint Provides-Extra: test License-File: LICENSE.txt # Sphinx Qt documentation [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Czaki/sphinx-qt-documentation/master.svg)](https://results.pre-commit.ci/latest/github/Czaki/sphinx-qt-documentation/master) [![Tests](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml/badge.svg)](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml) [![PyPI version](https://badge.fury.io/py/sphinx-qt-documentation.svg)](https://badge.fury.io/py/sphinx-qt-documentation) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) This is plugin to add cross-link to qt documentation for python code created with PyQt5 or PySide2. Currently, it supports `qtpy`, `Qt.py` wrappers and `PyQt5`, `PySide2`, `PyQt6` and`PySide6`. This extension provides one configuration option: `qt_documentation` with possible values: * PyQt5 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt5/api/ (incomplete) * Qt5 - linking to Qt5 documentation on "https://doc.qt.io/qt-5/" (default) * PySide2 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython-5/" * PyQt6 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt6/api/ (incomplete) * Qt6 - linking to Qt5 documentation on "https://doc.qt.io/qt-6/" * PySide6 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython/PySide6/" For default this extension use `inv` file from PyQt5 to resolve objects. to overwrite this behaviour set another url for `intersphinx_mapping[PyQt5]` ex.: ```python intersphinx_mapping = {... "PyQt5": (custom_url, None), ...} ``` This package currently does not support linking PyQt5 documentation using PySide2 `.inv` file ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1649363687.0 sphinx_qt_documentation-0.4.1/README.md0000664000175000017500000000345100000000000020743 0ustar00czakigrzegorz00000000000000# Sphinx Qt documentation [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Czaki/sphinx-qt-documentation/master.svg)](https://results.pre-commit.ci/latest/github/Czaki/sphinx-qt-documentation/master) [![Tests](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml/badge.svg)](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml) [![PyPI version](https://badge.fury.io/py/sphinx-qt-documentation.svg)](https://badge.fury.io/py/sphinx-qt-documentation) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) This is plugin to add cross-link to qt documentation for python code created with PyQt5 or PySide2. Currently, it supports `qtpy`, `Qt.py` wrappers and `PyQt5`, `PySide2`, `PyQt6` and`PySide6`. This extension provides one configuration option: `qt_documentation` with possible values: * PyQt5 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt5/api/ (incomplete) * Qt5 - linking to Qt5 documentation on "https://doc.qt.io/qt-5/" (default) * PySide2 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython-5/" * PyQt6 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt6/api/ (incomplete) * Qt6 - linking to Qt5 documentation on "https://doc.qt.io/qt-6/" * PySide6 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython/PySide6/" For default this extension use `inv` file from PyQt5 to resolve objects. to overwrite this behaviour set another url for `intersphinx_mapping[PyQt5]` ex.: ```python intersphinx_mapping = {... "PyQt5": (custom_url, None), ...} ``` This package currently does not support linking PyQt5 documentation using PySide2 `.inv` file ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1668267378.558643 sphinx_qt_documentation-0.4.1/setup.cfg0000664000175000017500000000247400000000000021311 0ustar00czakigrzegorz00000000000000[metadata] name = sphinx_qt_documentation version = 0.4.1 description = Plugin for proper resolve intersphinx references for Qt elements long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/Czaki/sphinx-qt-documentation author = Grzegorz Bokota author_email = bokota@gmail.com license = BSD-3-Clause license_file = LICENSE.txt platforms = Linux, Windows, MacOs classifiers = Development Status :: 3 - Alpha License :: OSI Approved :: BSD License Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: Implementation :: CPython keywords = Sphinx, Qt, PyQt5, PySide2, PyQt6, PySide6 [options] packages = find: install_requires = docutils sphinx python_requires = >=3.6 setup_requires = setuptools>=36.0 tests_require = pytest pytest-cov [options.extras_require] dev = pre-commit lint = black flake8 pylint test = pytest>=3.0.0 pytest-cov [flake8] max-line-length = 120 [pylint.FORMAT] max-line-length = 120 [isort] profile = black [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1627079453.0 sphinx_qt_documentation-0.4.1/setup.py0000644000175000017500000000004600000000000021171 0ustar00czakigrzegorz00000000000000import setuptools setuptools.setup() ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1668267378.558643 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation/0000755000175000017500000000000000000000000024425 5ustar00czakigrzegorz00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1649363687.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation/__init__.py0000664000175000017500000000346200000000000026545 0ustar00czakigrzegorz00000000000000""" This module contains sphinx extension supporting for build PartSeg documentation. this extension provides one configuration option: `qt_documentation` with possible values: * PyQt5 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt5/api/ (incomplete) * Qt5 - linking to Qt5 documentation on "https://doc.qt.io/qt-5/" (default) * PySide2 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython-5/" * PyQt6 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt6/api/ (incomplete) * Qt6 - linking to Qt5 documentation on "https://doc.qt.io/qt-6/" * PySide6 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython/PySide6/" """ from typing import Any, Dict from sphinx.application import Sphinx from sphinx.config import ENUM from sphinx_qt_documentation.utils import ( autodoc_process_signature, missing_reference, patch_intersphinx_mapping, ) def setup(app: Sphinx) -> Dict[str, Any]: app.setup_extension("sphinx.ext.autodoc") app.setup_extension("sphinx.ext.intersphinx") app.add_config_value( "qt_documentation", "Qt5", True, ENUM("Qt5", "PySide2", "PyQt5", "Qt6", "PySide6", "PyQt6"), ) app.connect("missing-reference", missing_reference) app.connect("autodoc-process-signature", autodoc_process_signature) app.connect("config-inited", patch_intersphinx_mapping, priority=800) # app.connect('doctree-read', doctree_read) return {"version": "0.1", "env_version": 1, "parallel_read_safe": True} # https://doc.qt.io/qtforpython/PySide6/QtWidgets/QListWidget.html#PySide6.QtWidgets.QListWidget.itemDoubleClicked # https://doc.qt.io/qtforpython/PySide6/QtWidgets/QListWidget.html# # PySide6.QtWidgets.PySide6.QtWidgets.QListWidget.itemDoubleClicked ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668190982.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation/utils.py0000644000175000017500000002733200000000000026146 0ustar00czakigrzegorz00000000000000""" implementation of sphinx missing_reference hook """ import importlib import inspect import re from typing import Optional, Tuple from docutils import nodes from docutils.nodes import Element, TextElement from sphinx.application import Sphinx from sphinx.config import Config from sphinx.environment import BuildEnvironment from sphinx.ext.intersphinx import InventoryAdapter from sphinx.locale import get_translation from sphinx.util.typing import Inventory _ = get_translation("sphinx") def _get_signal_and_version(): name_mapping = { "qtpy": (lambda: "QT_VERSION", "Signal"), "Qt": (lambda: "__qt_version__", "Signal"), "PySide2": ( lambda: importlib.import_module("PySide2.QtCore").__version__, "Signal", ), "PyQt5": ( lambda: importlib.import_module("PyQt5.QtCore").QT_VERSION_STR, "pyqtSignal", ), "PySide6": ( lambda: importlib.import_module("PySide6.QtCore").__version__, "Signal", ), "PyQt6": ( lambda: importlib.import_module("PyQt6.QtCore").QT_VERSION_STR, "pyqtSignal", ), } for module_name, (version, signal_name) in name_mapping.items(): try: core = importlib.import_module(f"{module_name}.QtCore") signal = getattr(core, signal_name) return signal, version() # pylint: disable=E1102 except ImportError: continue raise RuntimeError("No Qt bindings found") Signal, QT_VERSION = _get_signal_and_version() SIGNAL_PREFIXES_REGEX = "".join( rf"(?:{Signal.__module__.split('.', i)[-1]}\.)?" for i in range(len(Signal.__module__.split("."))) ) signal_slot_uri = { "Qt5": "https://doc.qt.io/qt-5/signalsandslots.html", "PySide2": "https://doc.qt.io/qtforpython/overviews/signalsandslots.html", "PyQt5": "https://www.riverbankcomputing.com/static/Docs/PyQt5/signals_slots.html", "Qt6": "https://doc.qt.io/qt-6/signalsandslots.html", "PySide6": "https://doc.qt.io/qtforpython/overviews/signalsandslots.html", "PyQt6": "https://www.riverbankcomputing.com/static/Docs/PyQt6/signals_slots.html", } signal_name_dict = { "Qt5": "Signal", "PySide2": "Signal", "PyQt5": "pyqtSignal", "Qt6": "Signal", "PySide6": "Signal", "PyQt6": "pyqtSignal", } slot_name = { "Qt5": "Slot", "PySide2": "Slot", "PyQt5": "pyqtSlot", "Qt6": "Slot", "PySide6": "Slot", "PyQt6": "pyqtSlot", } type_translate_dict = { "class": ["class", "enum", "attribute"], "meth": ["method", "signal"], "mod": ["module"], } signal_pattern = re.compile(r"((\w+\d?\.QtCore\.)|(QtCore\.)|(\.))?(pyqt)?Signal") slot_pattern = re.compile(r"((\w+\d?\.QtCore\.)|(QtCore\.)|(\.))?(pyqt)?Slot") def _fix_target(target: str, inventories: InventoryAdapter) -> str: if ( target.startswith("PySide2") and "PySide2" not in inventories.named_inventory and "PyQt5" in inventories.named_inventory ): _head, dot, tail = target.partition(".") return "PyQt5" + dot + tail if ( target.startswith("PyQt5") and "PyQt5" not in inventories.named_inventory and "PySide2" in inventories.named_inventory ): _head, dot, tail = target.partition(".") return "PySide2" + dot + tail if ( target.startswith("PySide6") and "PySide6" not in inventories.named_inventory and "PyQt6" in inventories.named_inventory ): _head, dot, tail = target.partition(".") return "PyQt6" + dot + tail if ( target.startswith("PyQt6") and "PyQt6" not in inventories.named_inventory and "PySide6" in inventories.named_inventory ): _head, dot, tail = target.partition(".") return "PySide6" + dot + tail return target def _get_inventory_for_target(target: str, inventories: InventoryAdapter) -> Inventory: name = "PySide6" prefix = target.partition(".")[0] if ( prefix in {"PySide2", "PyQt5", "PySide6", "PyQt6"} and prefix in inventories.named_inventory ): name = prefix for api in ("Qt", "Qt6", "PyQt6", "PyQt5", "PySide2"): if api in inventories.named_inventory: name = api break return inventories.named_inventory[name] def _extract_from_inventory(target: str, inventory, node: Element): target_list = [ target, "PyQt5." + target, "PySide2." + target, "PyQt6." + target, "PySide6." + target, ] if "sip:module" in inventory: target_list += [name + "." + target for name in inventory["sip:module"].keys()] if "py:module" in inventory: target_list += [name + "." + target for name in inventory["py:module"].keys()] target_list += [ name + "." + name + "." + target for name in inventory["py:module"].keys() ] type_names = type_translate_dict.get(node.get("reftype"), [node.get("reftype")]) for name in type_names: for prefix in ["sip", "py"]: obj_type_name = f"{prefix}:{name}" if obj_type_name in inventory: break else: continue for target_name in target_list: if target_name in inventory[obj_type_name]: _proj, version, uri, display_name = inventory[obj_type_name][ target_name ] if display_name in ["", "-"]: display_name = target uri = uri.replace("##", "#") return uri, display_name, version, target_name, name return None def _parse_pyside_uri(uri: str) -> Tuple[str, str]: """ Try to parse PySide URI and extract html file name and anchor """ uri_re = re.compile( r"https://doc.qt.io/qtforpython(-[56])?/(?P(PySide[26])(/\w+)+)\.html#(?P(\w+\.)+(\w+))" ) matched = uri_re.match(uri) if matched is None: raise ValueError(f"Cannot parse '{uri}' uri") path = matched.group("path") uri_anchor = matched.group("anchor") class_string = path.split("/")[-1] anchor = "" if uri_anchor.endswith(class_string) else uri_anchor.split(".")[-1] return class_string.lower() + ".html", anchor # pylint: disable=R0912 def _prepare_object( target: str, inventories: InventoryAdapter, node: Element, app: Sphinx ) -> Optional[Tuple[str, str, str]]: inventory = _get_inventory_for_target(target, inventories) res = _extract_from_inventory(target, inventory, node) if res is None: return None uri, display_name, version, target_name, name = res if app.config.qt_documentation == "Qt6": if "riverbankcomputing" in uri: html_name = uri.split("/")[-1] uri = "https://doc.qt.io/qt-6/" + html_name if name == "enum": uri += "-enum" else: # PySide6 documentation html_name, anchor = _parse_pyside_uri(uri) uri = ( "https://doc.qt.io/qt-6/" + html_name + ("#" + anchor if anchor else "") ) elif app.config.qt_documentation == "PySide6" and "PySide6" not in uri: if node.get("reftype") == "meth": split_tup = target_name.split(".")[1:] ref_name = ".".join(["PySide6", split_tup[0], "PySide6"] + split_tup) html_name = "/".join(split_tup[:-1]) + ".html#" + ref_name else: html_name = "/".join(target_name.split(".")[1:]) + ".html" uri = "https://doc.qt.io/qtforpython/PySide6/" + html_name elif app.config.qt_documentation == "Qt5": if "riverbankcomputing" in uri: html_name = uri.split("/")[-1] uri = "https://doc.qt.io/qt-5/" + html_name if name == "enum": uri += "-enum" else: # PySide6 documentation html_name, anchor = _parse_pyside_uri(uri) uri = ( "https://doc.qt.io/qt-5/" + html_name + ("#" + anchor if anchor else "") ) elif app.config.qt_documentation == "PySide2" and "PySide2" not in uri: if node.get("reftype") == "meth": split_tup = target_name.split(".")[1:] ref_name = ".".join(["PySide6", split_tup[0], "PySide2"] + split_tup) html_name = "/".join(split_tup[:-1]) + ".html#" + ref_name else: html_name = "/".join(target_name.split(".")[1:]) + ".html" uri = "https://doc.qt.io/qtforpython/PySide2/" + html_name return uri, display_name, version # noinspection PyUnusedLocal # pylint: disable=W0613 def missing_reference( app: Sphinx, env: BuildEnvironment, node: Element, contnode: TextElement ) -> Optional[nodes.reference]: """Linking to Qt documentation.""" target: str = node["reftarget"] inventories = InventoryAdapter(env) if node["reftype"] == "any": # we search anything! domain = None else: domain = node.get("refdomain") if not domain: # only objects in domains are in the inventory return None if not env.get_domain(domain).objtypes_for_role(node["reftype"]): return None new_target = _fix_target(target, inventories) if signal_pattern.match(new_target): uri = signal_slot_uri[app.config.qt_documentation] version = QT_VERSION display_name = signal_name_dict[app.config.qt_documentation] elif slot_pattern.match(new_target): uri = signal_slot_uri[app.config.qt_documentation] version = QT_VERSION display_name = slot_name[app.config.qt_documentation] else: resp = _prepare_object(new_target, inventories, node, app) if resp is None: return None uri, display_name, version = resp # remove this line if you would like straight to pyqt documentation if version: reftitle = _("(in %s v%s)") % (app.config.qt_documentation, version) else: reftitle = _("(in %s)") % (app.config.qt_documentation,) newnode = nodes.reference("", "", internal=False, refuri=uri, reftitle=reftitle) if node.get("refexplicit"): # use whatever title was given newnode.append(contnode) else: # else use the given display name (used for :ref:) newnode.append(contnode.__class__(display_name, display_name)) return newnode # noinspection PyUnusedLocal # pylint: disable=W0613,R0913 def autodoc_process_signature( app: Sphinx, what, name: str, obj, options, signature, return_annotation ): if isinstance(obj, Signal): module_name, class_name, signal_name_local = name.rsplit(".", 2) module = importlib.import_module(module_name) class_ob = getattr(module, class_name) reg = re.compile( rf" +{signal_name_local} *= *{SIGNAL_PREFIXES_REGEX}Signal(\([^)]*\))" ) match = reg.findall(inspect.getsource(class_ob)) if match: return match[0], None pos = len(name.rsplit(".", 1)[1]) return ", ".join(sig[pos:] for sig in obj.signatures), None return None def patch_intersphinx_mapping(app: Sphinx, config: Config) -> None: url_mapping = { "PySide6": "https://doc.qt.io/qtforpython", "PyQt6": "https://www.riverbankcomputing.com/static/Docs/PyQt6", "PySide2": "https://doc.qt.io/qtforpython-5", "PyQt5": "https://www.riverbankcomputing.com/static/Docs/PyQt5", } name = getattr(app.config, "qt_documentation", "Qt6") if name == "Qt5": name = "PyQt5" elif name == "Qt6": name = "PyQt6" url = url_mapping[name] intersphinx_mapping = getattr(app.config, "intersphinx_mapping") if intersphinx_mapping is None: intersphinx_mapping = {} intersphinx_mapping[name] = (name, (url, (None,))) app.config.intersphinx_mapping = intersphinx_mapping ././@PaxHeader0000000000000000000000000000003300000000000011451 xustar000000000000000027 mtime=1668267378.558643 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/0000755000175000017500000000000000000000000026117 5ustar00czakigrzegorz00000000000000././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668267378.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/PKG-INFO0000664000175000017500000000556200000000000027226 0ustar00czakigrzegorz00000000000000Metadata-Version: 2.1 Name: sphinx-qt-documentation Version: 0.4.1 Summary: Plugin for proper resolve intersphinx references for Qt elements Home-page: https://github.com/Czaki/sphinx-qt-documentation Author: Grzegorz Bokota Author-email: bokota@gmail.com License: BSD-3-Clause Keywords: Sphinx,Qt,PyQt5,PySide2,PyQt6,PySide6 Platform: Linux Platform: Windows Platform: MacOs Classifier: Development Status :: 3 - Alpha Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: Implementation :: CPython Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: dev Provides-Extra: lint Provides-Extra: test License-File: LICENSE.txt # Sphinx Qt documentation [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Czaki/sphinx-qt-documentation/master.svg)](https://results.pre-commit.ci/latest/github/Czaki/sphinx-qt-documentation/master) [![Tests](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml/badge.svg)](https://github.com/Czaki/sphinx-qt-documentation/actions/workflows/test.yaml) [![PyPI version](https://badge.fury.io/py/sphinx-qt-documentation.svg)](https://badge.fury.io/py/sphinx-qt-documentation) [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) This is plugin to add cross-link to qt documentation for python code created with PyQt5 or PySide2. Currently, it supports `qtpy`, `Qt.py` wrappers and `PyQt5`, `PySide2`, `PyQt6` and`PySide6`. This extension provides one configuration option: `qt_documentation` with possible values: * PyQt5 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt5/api/ (incomplete) * Qt5 - linking to Qt5 documentation on "https://doc.qt.io/qt-5/" (default) * PySide2 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython-5/" * PyQt6 - linking to PyQt documentation on https://www.riverbankcomputing.com/static/Docs/PyQt6/api/ (incomplete) * Qt6 - linking to Qt5 documentation on "https://doc.qt.io/qt-6/" * PySide6 - linking to PySide6 documentation on "https://doc.qt.io/qtforpython/PySide6/" For default this extension use `inv` file from PyQt5 to resolve objects. to overwrite this behaviour set another url for `intersphinx_mapping[PyQt5]` ex.: ```python intersphinx_mapping = {... "PyQt5": (custom_url, None), ...} ``` This package currently does not support linking PyQt5 documentation using PySide2 `.inv` file ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668267378.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/SOURCES.txt0000664000175000017500000000054300000000000030007 0ustar00czakigrzegorz00000000000000LICENSE.txt MANIFEST.in README.md setup.cfg setup.py sphinx_qt_documentation/__init__.py sphinx_qt_documentation/utils.py sphinx_qt_documentation.egg-info/PKG-INFO sphinx_qt_documentation.egg-info/SOURCES.txt sphinx_qt_documentation.egg-info/dependency_links.txt sphinx_qt_documentation.egg-info/requires.txt sphinx_qt_documentation.egg-info/top_level.txt././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668267378.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/dependency_links.txt0000664000175000017500000000000100000000000032167 0ustar00czakigrzegorz00000000000000 ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668267378.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/requires.txt0000664000175000017500000000013700000000000030522 0ustar00czakigrzegorz00000000000000docutils sphinx [dev] pre-commit [lint] black flake8 pylint [test] pytest>=3.0.0 pytest-cov ././@PaxHeader0000000000000000000000000000002600000000000011453 xustar000000000000000022 mtime=1668267378.0 sphinx_qt_documentation-0.4.1/sphinx_qt_documentation.egg-info/top_level.txt0000664000175000017500000000003000000000000030644 0ustar00czakigrzegorz00000000000000sphinx_qt_documentation