diff options
Diffstat (limited to 'sources/shiboken2/shibokenmodule')
-rw-r--r-- | sources/shiboken2/shibokenmodule/CMakeLists.txt | 8 | ||||
-rw-r--r-- | sources/shiboken2/shibokenmodule/Shiboken.pyi | 54 | ||||
-rw-r--r-- | sources/shiboken2/shibokenmodule/py.typed.in | 1 |
3 files changed, 63 insertions, 0 deletions
diff --git a/sources/shiboken2/shibokenmodule/CMakeLists.txt b/sources/shiboken2/shibokenmodule/CMakeLists.txt index 9b2b58528..c861caf29 100644 --- a/sources/shiboken2/shibokenmodule/CMakeLists.txt +++ b/sources/shiboken2/shibokenmodule/CMakeLists.txt @@ -41,6 +41,14 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_config.py" configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in" "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken.pyi" + "${CMAKE_CURRENT_BINARY_DIR}/Shiboken.pyi" @ONLY) +# typing support for mypy +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/py.typed.in" + "${CMAKE_CURRENT_BINARY_DIR}/py.typed" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken.pyi" + "${CMAKE_CURRENT_BINARY_DIR}/py.typed" + DESTINATION "${PYTHON_SITE_PACKAGES}/shiboken2") # Variable from enclosing scope. foreach(item IN LISTS shiboken_python_files) diff --git a/sources/shiboken2/shibokenmodule/Shiboken.pyi b/sources/shiboken2/shibokenmodule/Shiboken.pyi new file mode 100644 index 000000000..93556ba40 --- /dev/null +++ b/sources/shiboken2/shibokenmodule/Shiboken.pyi @@ -0,0 +1,54 @@ +############################################################################# +## +## Copyright (C) 2022 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of Qt for Python. +## +## $QT_BEGIN_LICENSE:COMM$ +## +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## $QT_END_LICENSE$ +## +############################################################################# + +from __future__ import annotations + +""" +This file contains the exact signatures for all functions in module +Shiboken, except for defaults which are replaced by "...". +""" + +# Module `Shiboken` + +from shiboken2 import Shiboken + + +class Object(object): + + def __init__(self) -> None: ... + + +class VoidPtr(object): ... + + +def _unpickle_enum(arg__1: object, arg__2: object) -> object: ... +def createdByPython(arg__1: Shiboken.Object) -> bool: ... +def delete(arg__1: Shiboken.Object) -> None: ... +def dump(arg__1: object) -> str: ... +def getAllValidWrappers() -> Shiboken.Object: ... +def getCppPointer(arg__1: Shiboken.Object) -> Shiboken.Object: ... +def invalidate(arg__1: Shiboken.Object) -> None: ... +def isValid(arg__1: object) -> bool: ... +def ownedByPython(arg__1: Shiboken.Object) -> bool: ... +def wrapInstance(arg__1: int, arg__2: type) -> Shiboken.Object: ... + + +# eof diff --git a/sources/shiboken2/shibokenmodule/py.typed.in b/sources/shiboken2/shibokenmodule/py.typed.in new file mode 100644 index 000000000..0e76a07dc --- /dev/null +++ b/sources/shiboken2/shibokenmodule/py.typed.in @@ -0,0 +1 @@ +# this is a marker file for mypy |