-
Notifications
You must be signed in to change notification settings - Fork 0
Style
We agreed upon usage of some tools in our organization, to keep our code clean and consistent:
- Auto-formatter Black
- Imports sorter isort
- Linter Pylint
This wiki page shows how to setup and configure those tools 🤓
Setup for VSC is really easy! Just download these 3 extensions!
Below there are links to marketplace and commands for VSC to actually install extensions without serching in GUI.
To install them, just copy the code after lunching VSC Quick Open (Ctrl+P
).
ext install ms-python.black-formatter
ext install ms-python.isort
ext install ms-python.pylint
To configure auto-formatter and import sorter, simply open global settings.json (Ctrl+Shift+P
> Preferences:Open Settings(JSON)) or add workspace setting.
In these settings, just put lines that enable these tools with on-save actions just like in example settings. This config differs from standard Black config in length of the line (PEP 80 vs Black 88 vs Ours 120 for 4K/Wide screens).
Pylint will run right after installation in VSC. Most likely you need to provide some kind of per-workspace config, so called .pylintrc
, just like in zed-utils .pylintrc.
Linter results will be shown in Problems tab in VSC. Try to minimize the number of problems, but don't bother if you lack docstring to main()
function 😉.