[PATCH 10/23] tuna: Add Pyright helper

John Kacur
2025-11-07T18:58:09Z

From: "John B. Wyatt IV" <jwyatt@redhat.com>

Pyright is a common tool to assist with linting and finding errors in
Python programs with an LSP like Visual Studio Code, Neovim, and Emacs. _("")
syntax convention is used by gettext for translations and is a common default
but Pyright needs to be set to not give an error for it. Add __builtins__.pyi
with the _() convention to satisfy Pyright.

Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
__builtins__.pyi | 1 +
1 file changed, 1 insertion(+)
create mode 100644 __builtins__.pyi

diff --git a/__builtins__.pyi b/__builtins__.pyi
new file mode 100644
index 000000000000..0e3a4b2d50e8
--- /dev/null
+++ b/__builtins__.pyi
@@ -0,0 +1 @@
+def _(s: str) -> str: ...
--
2.51.1