Improving Your Python Code Quality with Ruff-VSCode Linter - Tips and Best Practices

Опубликовано: 08 Октябрь 2024
на канале: Vasudev Menon
3,850
12

#ruff #pythonprogramming #linting #formatting #vscodeextensions #vscode #python3 #rust
#development #productivity
Ruff is an extremely fast Python linter, written in Rust built by Charlie Marsh.
He is focused on building high performance developer tools for python ecosystem and thereby help the python community.

I have been using Ruff on VSCode for few weeks and in my testing, not only it consumes less CPU and memory with multiple instances the performance didn't tank even with larger codebase. Ruff blows other linting tools(Flake8,Autoflake,Pylint etc..) out of the water in terms of performance and resource usage.

I have been using Pylint in virtual environment as well as VSCode extension and performance often left a lot to be desired or didn't meet expectations.
Anyway, I used Python 3.11.2 virtual environment on Windows 10 22H2.

Links:
Developer Bio:https://github.com/charliermarsh
Ruff extension for Visual Studio Code: https://github.com/charliermarsh/ruff...
Ruff docs: https://beta.ruff.rs/docs/
Ruff: https://github.com/charliermarsh/ruff
Python repo for testing: https://github.com/geekcomputers/Python
Python repo for testing: https://github.com/Python-World/pytho...
VSCode:https://code.visualstudio.com/
Timestamps:
0:00 start
0:19 Intro
01:53 usage
06:16 inlay type hints
07:00 outro

Thumbnail made with FreePik:https://www.freepik.com/photo-editor/...