I had this problem since I started using the code runner extension. a file called tempCodeRunnerFile.py get created and runs when I click on the run button it really annoying, I tried deleting the tempCodeRunnerFile.py file but it keeps coming back.
It indicates that you have selected part of the code snippet and run it.
You can add "code-runner.ignoreSelection": true in the settings.json file to avoid it.
tempCodeRunnerFile.py problem in visual sudio