diff options
author | Christian Tismer <[email protected]> | 2024-10-23 12:27:03 +0200 |
---|---|---|
committer | Christian Tismer <[email protected]> | 2024-10-31 13:35:14 +0100 |
commit | c37642f241fb21ae81bb7ff8721deb8a423ef0c1 (patch) | |
tree | 018c30724df9d3658b8328d36913197be66b24cd /sources/pyside6/doc/developer/signature_doc.rst | |
parent | fd0b56839e5fa07e720bc945a961b07a0bf7cd24 (diff) |
type hints: Add some mypy explanations to developer docs
First attempt to explain a little how mypy errors were treated.
Task-number: PYSIDE-2846
Change-Id: I13a0d2b8298d5fd1637d3bca9e2b979c7062b811
Pick-to: 6.8 6.8.0
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'sources/pyside6/doc/developer/signature_doc.rst')
-rw-r--r-- | sources/pyside6/doc/developer/signature_doc.rst | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/sources/pyside6/doc/developer/signature_doc.rst b/sources/pyside6/doc/developer/signature_doc.rst index a6c703dab..fa1127240 100644 --- a/sources/pyside6/doc/developer/signature_doc.rst +++ b/sources/pyside6/doc/developer/signature_doc.rst @@ -110,26 +110,26 @@ The C++ code involved with the signature module is completely in the file shiboken6/libshiboken/signature.cpp . All other functionality is implemented in the ``signature`` Python package. It has the following structure:: - sources/shiboken6/shibokenmodule/files.dir/shibokensupport - ├── __init__.py - ├── feature.py - ├── fix-complaints.py - ├── shibokensupport.pyproject - └── signature - ├── PSF-3.7.0.txt - ├── __init__.py - ├── errorhandler.py - ├── importhandler.py - ├── layout.py - ├── lib - │ ├── __init__.py - │ ├── enum_sig.py - │ ├── pyi_generator.py - │ └── tool.py - ├── loader.py - ├── mapping.py - ├── parser.py - └── qt_attribution.json + sources/shiboken6/shibokenmodule/files.dir/shibokensupport + ├── __init__.py + ├── feature.py + ├── fix-complaints.py + ├── shibokensupport.pyproject + └── signature + ├── PSF-3.7.0.txt + ├── __init__.py + ├── errorhandler.py + ├── importhandler.py + ├── layout.py + ├── lib + │ ├── __init__.py + │ ├── enum_sig.py + │ ├── pyi_generator.py + │ └── tool.py + ├── loader.py + ├── mapping.py + ├── parser.py + └── qt_attribution.json Really important are the **parser**, **mapping**, **errorhandler**, **enum_sig**, **layout** and **loader** modules. The rest is needed to create Python 2 compatibility @@ -350,6 +350,23 @@ as default content for docstrings. This was implemented in ``Qt For Python 5.12.1``. +Update and Future of the Signature Module +----------------------------------------- + +.. code-block:: bash + + PYSIDE-2101: The __signature__ attribute is gone due to rlcompleter. + +End of 2022, a change to the rlcompleter module made it impossible to further +support an unofficial ``__signature__`` attribute in PySide. From then on, +the functionality of signatures was kept by a ``get_signature`` function. + +Over the years, the requirements for the correctness of the generated pyi files +have increased drastically, and a lot of effort went into making the generated +``.pyi`` files correct for the current ``mypy`` tool. Mode information +about the kind of errors corrected can be found in the :ref:`mypy-correctnes` section. + + Literature ---------- |