diff options
| author | Christian Tismer <tismer@stackless.com> | 2021-11-02 15:52:02 +0100 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2021-11-11 11:11:46 +0100 |
| commit | e1909dfdd4dcc0742600d04afcfb3017ae471a31 (patch) | |
| tree | 0410751fac68e14581364727e8f74cf4e1203561 /sources/pyside6/libpyside/pysideslot.cpp | |
| parent | c9ba44deb48a064eec9229b5426187611c7d592a (diff) | |
mypy-support: Improve handling of slots, enum and PathLike
As a preparation of the move to Python enums, the types
of enums are now reported as Python enum. This avoids certain
errors in the .pyi files. The correct implementation will
follow.
PathLike is now correctly imported via os if necessary.
slot() has corrected signature and reports a call method.
[ChangeLog][shiboken6] The .pyi file generation was improved to
have correct slot(), PathLike and better enum handling.
Change-Id: I547de6a1203302f73826f27ee633e9de810f687b
Fixes: PYSIDE-1520
Task-number: PYSIDE-1675
Pick-to: 6.2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysideslot.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/pysideslot.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/pysideslot.cpp b/sources/pyside6/libpyside/pysideslot.cpp index bad94db6b..c20945066 100644 --- a/sources/pyside6/libpyside/pysideslot.cpp +++ b/sources/pyside6/libpyside/pysideslot.cpp @@ -181,7 +181,8 @@ PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */) namespace PySide::Slot { static const char *Slot_SignatureStrings[] = { - "PySide6.QtCore.Slot(self,*types:type,name:str=nullptr,result:str=nullptr)->typing.Callable[...,typing.Optional[str]]", + "PySide6.QtCore.Slot(self,*types:type,name:str=nullptr,result:str=nullptr)", + "PySide6.QtCore.Slot.__call__(self,function:typing.Callable)->typing.Any", nullptr}; // Sentinel void init(PyObject *module) |
