aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <[email protected]>2022-01-04 13:44:11 +0100
committerChristian Tismer <[email protected]>2022-01-04 18:35:58 +0100
commit03109e44630ed23a10aba232108906b801c76fb5 (patch)
tree4858476a489a21450436a012ead7187effbf1ebe
parent159adca779f67afcbe669d298572fb0ea57a4236 (diff)
mypy-support: Add a stub file for __feature__ import
This allows to use "from feature import" when using mypy. Task-number: PYSIDE-1675 Change-Id: Ia2a5d27d1489df2af5136a2ad2af072eb089b66f Fixes: PYSIDE-1754 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
-rw-r--r--sources/pyside6/PySide6/CMakeLists.txt2
-rw-r--r--sources/pyside6/PySide6/__feature__.pyi.in46
2 files changed, 48 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/CMakeLists.txt b/sources/pyside6/PySide6/CMakeLists.txt
index 68ce0d2b8..316697262 100644
--- a/sources/pyside6/PySide6/CMakeLists.txt
+++ b/sources/pyside6/PySide6/CMakeLists.txt
@@ -8,6 +8,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
"${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_config.py.in"
"${CMAKE_CURRENT_BINARY_DIR}/_config.py" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__feature__.pyi.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/__feature__.pyi" @ONLY)
# typing support for mypy
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/py.typed.in"
"${CMAKE_CURRENT_BINARY_DIR}/py.typed" @ONLY)
diff --git a/sources/pyside6/PySide6/__feature__.pyi.in b/sources/pyside6/PySide6/__feature__.pyi.in
new file mode 100644
index 000000000..1cc704fb8
--- /dev/null
+++ b/sources/pyside6/PySide6/__feature__.pyi.in
@@ -0,0 +1,46 @@
+#############################################################################
+##
+## Copyright (C) 2021 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of Qt for Python.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## 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.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+snake_case = 0x01
+true_property = 0x02
+
+all_feature_names = [
+ "snake_case",
+ "true_property",
+]