I have a python project with gettext. And I use gettext.install for adding _ to built-ins, so it works correctly. But my pyright always shows error: _ is not defined. How can I let pyright know this function?
My pyrightconfig.json:
{
"venvPath": ".",
"venv": "env"
}
According to the pyright documentation, you can add custom built-in types by adding a
__builtins__.pyifile to the root of your project.See Extending Builtins.