Boost Your Python Code Quality: Pre-commit Tutorial (UV & Ruff)

preview_player
Показать описание
This video shows how to create a solid pre-commit setup for Python.

#code #python #tutorial #education #cicd #uv #ruff #pyright #precommit

00:00:00 Intro
00:00:26 Goal
00:00:45 Installation
00:01:24 Lock file
00:02:01 Running the CLI
00:02:51 Ruff
00:03:00 Pyright
00:03:34 Tests
00:04:33 Outro
Рекомендации по теме
Комментарии
Автор

You are really motivating me to introduce a CI / CD pipeline for my python startup development!
Every of your videos is like a friendly reminder, that I should be doing that.

timothyspottering
Автор

Thank you so much for the follow up video. Another fantastic video.

Could you please share your thoughts on the tools and ways to document your python projects.

SalahSaoud-js
Автор

Thank you! Fantastic. Just was playing around with it and it was not working for me. Found your video and it helped :)

viakondratiuk
Автор

Thank you for sharing. This helps a lot.

kurtke
Автор

@0:44 just so you know: some of the characters in the icons are a lot closer together than the others, looks kinda weird. Maybe a kerning setting in the tool you're using to generate those?

it_is_ni
Автор

Great video! I am learning a lot with your channel, keep the work!

Just one note. I'm missing something to check if the pyproject version is the same as the tag when created. I sometimes miss this when pushing the changes for the new version... Thanks in advance!

pablofueros
Автор

Great video! Would you consider making a video about your PyCharm settings? Your setup looks minimalist, similar to my VSCode, and I’m interested in migrating from VSCode to PyCharm. I’ve customized a lot of settings in VSCode, but I’d like to learn more about PyCharm and its benefits. I've tried adjusting some settings and the UI to resemble yours, but I couldn’t quite get it right. I’d also love to know about integrations with tools like Ruff and Pyright in PyCharm and how they work together.

Автор

Can u share your nvim config, or make a video about it ? 🙏

alejandroulisessanchezgame
Автор

Is there a particular reason why the pre-commit file is inside the tests folder? and not in the project root.
Also, I believe the pyproject.toml file is in the tests folder just to run this specific example?
Could you also give an example for gitlab?

Aristocle
Автор

I love it a lot! 2 questions.
1) will you update the website to add pre-commit instruction?
2) the pre-commit versioned hooks aren't updated to stay in sync if pyproject.toml version are updated, do you have any idea how to keep the pre-commit and local project tooling on the same version? example: pyright recently complained:
```
WARNING: there is a new pyright version available (v1.1.387 -> v1.1.390).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
```
which requires updating both files

yorailevi
visit shbcf.ru