OSDN Git Service

CI: add stubs for libcalamares bits, to help pylint
authorAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 15:27:42 +0000 (17:27 +0200)
committerAdriaan de Groot <groot@kde.org>
Mon, 27 Sep 2021 15:27:42 +0000 (17:27 +0200)
ci/libcalamares/__init__.py [new file with mode: 0644]
ci/libcalamares/globalstorage.py [new file with mode: 0644]
ci/libcalamares/utils.py [new file with mode: 0644]

diff --git a/ci/libcalamares/__init__.py b/ci/libcalamares/__init__.py
new file mode 100644 (file)
index 0000000..11bf0ff
--- /dev/null
@@ -0,0 +1,9 @@
+#   SPDX-FileCopyrightText: no
+#   SPDX-License-Identifier: CC0-1.0
+#
+# Stubs for part of the Python API from libcalamares
+# (although the **actual** API is presented through
+# Boost::Python, not as a bare C-extension) so that
+# pylint doesn't complain about libcalamares internals.
+
+pass
diff --git a/ci/libcalamares/globalstorage.py b/ci/libcalamares/globalstorage.py
new file mode 100644 (file)
index 0000000..3c2acb8
--- /dev/null
@@ -0,0 +1,9 @@
+#   SPDX-FileCopyrightText: no
+#   SPDX-License-Identifier: CC0-1.0
+#
+# Stubs for part of the Python API from libcalamares
+# (although the **actual** API is presented through
+# Boost::Python, not as a bare C-extension) so that
+# pylint doesn't complain about libcalamares internals.
+
+def value(_): return 1
diff --git a/ci/libcalamares/utils.py b/ci/libcalamares/utils.py
new file mode 100644 (file)
index 0000000..1d42389
--- /dev/null
@@ -0,0 +1,15 @@
+#   SPDX-FileCopyrightText: no
+#   SPDX-License-Identifier: CC0-1.0
+#
+# Stubs for part of the Python API from libcalamares
+# (although the **actual** API is presented through
+# Boost::Python, not as a bare C-extension) so that
+# pylint doesn't complain about libcalamares internals.
+
+def debug(_): pass
+
+def warning(_): pass
+
+def gettext_path(): pass
+
+def gettext_languages(): pass