diff options
| author | Christian Tismer <tismer@stackless.com> | 2024-09-21 00:13:56 +0200 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2024-10-17 15:09:29 +0200 |
| commit | 8a416e88cc63788550d7561b948456d1d2a122ce (patch) | |
| tree | ae08c6bd75220a01d6b888a8ca9f8fefc6fa3404 /sources/pyside6/PySide6/support/generate_pyi.py | |
| parent | 7ee3fb7958d6384baf3d1bd4cfe4931cacfa77df (diff) | |
type hints: Evaluate multiple signatures and Union Expressions
The multiple signatures suffer from the problem that
many are reported as error, because one larger type
is evaluated before another type.
An Example: PySide6.QtCore.QCborSimpleType is shadowed by int
when int is listed first. That is due to the mro:
int.mro() [<class 'int'>, <class 'object'>]
QCborSimpleType.mro() [<enum 'QCborSimpleType'>, <enum 'IntEnum'>,
<class 'int'>, <enum 'ReprEnum'>,
<enum 'Enum'>, <class 'object'>]
We are implementing a topological sort by mro length that
puts the list into the right order.
Result is from 226 down to 30.
Change-Id: I155e2169c3c8ab4afd5b7bb8f3411ccf6467d440
Task-number: PYSIDE-2846
Fixes: PYSIDE-2687
Fixes: PYSIDE-2886
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/support/generate_pyi.py')
| -rw-r--r-- | sources/pyside6/PySide6/support/generate_pyi.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/support/generate_pyi.py b/sources/pyside6/PySide6/support/generate_pyi.py index 39a916655..7eee7705d 100644 --- a/sources/pyside6/PySide6/support/generate_pyi.py +++ b/sources/pyside6/PySide6/support/generate_pyi.py @@ -7,6 +7,7 @@ generate_pyi.py This script generates the .pyi files for all PySide modules. """ +# mypy: disable-error-code="import-not-found" import argparse import inspect # noqa: F401 |
