Linting in Visual Studio Code for Python Turtle graphics

by Lisa Dean

The built-in linter doesn’t do well with turtle. You can choose a different linter like flake8. However, you’ll trade off one annoying thing for a different annoying thing. Choose your poison.

  • Open the command palette (⌘ + Shift + P)
  • Select “Python: Select Linter”
  • Choose “flake8”
  • If you’ve never used that before, you’ll be prompted to install it with a prompt similar to this


  • Do that and restart VS Code
  • Now you can get the red squiggles to go away on the turtle function names by explicitly naming them in multiple import statements (this is the annoying thing about the fix).


  • To switch back to the default linter, choose “Python: Select Linter” again and choose “pylint”