Re: [PATCH] tuna: Add Pyright helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 22 Jul 2025, John B. Wyatt IV wrote:

> 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@xxxxxxxxxx>
> Signed-off-by: John B. Wyatt IV <sageofredondo@xxxxxxxxx>
> ---
>  __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 0000000..0e3a4b2
> --- /dev/null
> +++ b/__builtins__.pyi
> @@ -0,0 +1 @@
> +def _(s: str) -> str: ...
> -- 
> 2.50.1
> 
> 
> 
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux