The simplest, fastest pycodestyle linter available!
PyCodeQ is a fast, simple, and lightweight linter extension for Python in Visual Studio Code. It uses pycodestyle to check your Python files for style issues and instantly highlights problems in your code.
Features
Runs pycodestyle automatically when you save or open a Python file
Highlights style issues directly in the editor using VS Code diagnostics
Command: PyCodeQ: Run Linter Check (available in the Command Palette)
Configurable path to the pycodestyle executable
Ignore specific error codes via settings
No configuration required—just install and start linting!
Custom Executable Path Demo
Ignore Error Codes Demo
Requirements
Python must be installed on your system
You must have pycodestyle installed and available in your PATH (or specify a custom path in settings)
Install with:
pip install pycodestyle
(Optional): If you want to use auto-fix on open/save, install:
pip install autopep8
Usage
Open any Python file in VS Code.
Save the file or run the command PyCodeQ: Run Linter Check from the Command Palette.
Style issues will be highlighted in the editor and listed in the Problems panel.
(Optional) Configure the path to pycodestyle or ignore error codes in the extension settings.
Auto-fix (optional)
PyCodeQ can optionally run an external fixer to automatically correct style violations when a file is opened or closed. This behavior is off by default.
To enable auto-fix on save, set pycodeq.autoFixOnSave to true in your settings.
By default PyCodeQ uses autopep8 with the --in-place option. You can change the path to the autopep8 executable using pycodeq.autopep8ExecutablePath.
If the fixer isn't available, PyCodeQ will show a notification and still run the linter so diagnostics are displayed.