Skip to content

Conversation

georgiy-belyanin
Copy link

Set up a project.
Set up a descent linting/formatting tools.
Configure the CI.
Add modern pre-commit git hooks managers.
Not use them for running formatters and linters.

This patch adds the hooks for checking formatting and linting of the python code to the pre-commit configuration.

> Set up a project.
> Set up a descent linting/formatting tools.
> Configure the CI.
> Add modern pre-commit git hooks managers.
> Not use them for running formatters and linters.

This patch adds the hooks for checking formatting and linting of the
python code to the pre-commit configuration.
@georgiy-belyanin
Copy link
Author

georgiy-belyanin commented Sep 8, 2024

This pre-commit stuff works too smart for me. Everything seems to work though I'd be glad if someone also tested out the patch whether it works as intended.

@WoWaster
Copy link
Collaborator

WoWaster commented Sep 8, 2024

О, крутая штука! Я не добавил ruff в pre-commit, потому что идея содержать отдельные бинарики ruff и в rye, и в pre-commit показалась мне избыточной. Я не знал, что можно просто команды дёргать. Думаю, для тестирования стоит порекламить этот патч в чатике.

@toadharvard
Copy link

toadharvard commented Sep 15, 2024

Надо бы в CI убрать запуск проверки пре-коммит хуков или форматтера, так как не имеет смысла дважды запускать проверку форматирования (и в хуках и отдельной командой)

- name: Run pre-commit
run: |
rye run -- pre-commit run --all-files --color always --verbose --show-diff-on-failure
- name: Run ruff format
run: rye fmt --check
- name: Run ruff linter
run: rye lint -- --output-format=github

@gsvgit
Copy link
Member

gsvgit commented Jul 16, 2025

@georgiy-belyanin @WoWaster Что в итоге надо стдеать, чтобы таки влить этот реквест?

@WoWaster
Copy link
Collaborator

WoWaster commented Sep 5, 2025

Да, надо сделать как предлагает Вадим --- убрать запуск rye в CI скриптах и запускать всё через pre-commit.
@georgiy-belyanin, сделаешь?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants