[Python] Why does my "defineConstant" in pyrightconfig.json not work in VSCode

Discussão em 'Python' iniciado por Stack, Abril 25, 2025.

  1. Stack

    Stack Membro Participativo

    In VSCode, my "defineConstant" does not work. For example,

    "defineConstant": {
    "__dev__": true,
    },


    But __dev__ in my code is still warning in VSCode. View problems:


    "__dev__" is not defined Pylance(reportUndefinedVariable)
    ​

    My Pylance's version is 2025.4.1.

    Continue reading...

Compartilhe esta Página