Skip to content

Chore/add pre commit#65

Open
gabrieljreed wants to merge 3 commits intomainfrom
chore/add-pre-commit
Open

Chore/add pre commit#65
gabrieljreed wants to merge 3 commits intomainfrom
chore/add-pre-commit

Conversation

@gabrieljreed
Copy link
Collaborator

Add pre-commit with the following hooks:

  • check-yaml
  • end-of-file-fixer
  • trailing-whitespace
  • black
  • isort

This will help us be more consistent as we are both working on the code base and save us a lot of time so we don't need to manually format our code. It will also help us look more legit to any other developers who might come across the repo.

How to use pre-commit

In the terminal, install pre-commit

pip install pre-commit

Then, install the pre-commit hooks

pre-commit install

Now, any time you go to commit your code, pre-commit will automatically run and format your files for you. You may need to try committing a few times in case it finds some errors.

You can also run pre-commit at any point with

pre-commit run -a

@gabrieljreed gabrieljreed requested a review from DeRemerJD July 20, 2024 20:22
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.

1 participant