Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add pre-commit #2

wants to merge 1 commit into from

Conversation

gulyash
Copy link
Collaborator

@gulyash gulyash commented May 23, 2024

Adding a config for pre-commit. At the moment there's only a black formatter hook.

@gulyash gulyash marked this pull request as ready for review May 23, 2024 19:43
Copy link
Member

@YtvwlD YtvwlD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config looks good to me.
I guess, the diff of the python files comes from running black?

Looking at https://pre-commit.com/#3-install-the-git-hook-scripts, we'd need to add a file to .git to actually execute this – and we'd need to install pre-commit. Should we do this via pipenv?

- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can use https://github.com/astral-sh/ruff-pre-commit instead of black

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.

3 participants