'"isUseingPreset" is not accessed Pylance

I have a global var, and when i use it in a function it says "isUseingPreset is not accessed Pylance".

here is the code :

isUseingPreset = False


def PresetHELLO():
    print("preset HELLO")
    env.PAYLOAD["content"] = "Hello"
    isUseingPreset = True
    reveiewInput()

photo of the error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source