Linting in Visual Studio Code for Python Turtle graphics
1 min readApr 30, 2018
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”
Resources:
https://github.com/Microsoft/vscode-python/issues/1056
https://code.visualstudio.com/docs/python/linting
Originally published at www.lisadean.net.