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

Pre-commit hook #17

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Pre-commit hook #17

merged 2 commits into from
Apr 24, 2024

Conversation

anton-seaice
Copy link
Contributor

@anton-seaice anton-seaice commented Apr 22, 2024

Add pre commit hook for black formatter. Closes #14

@anton-seaice anton-seaice marked this pull request as ready for review April 22, 2024 06:39
@anton-seaice anton-seaice marked this pull request as draft April 22, 2024 06:41
@anton-seaice anton-seaice marked this pull request as ready for review April 22, 2024 06:48
Comment on lines +4 to +10
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious why you use local here rather than the reusable repo e.g.

Suggested change
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
language_version: python3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm just going to leave it as is so that we don't have to pin it to a specific 'rev' version. Well see how it goes

@anton-seaice anton-seaice merged commit f5d137f into COSIMA:main Apr 24, 2024
4 checks passed
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.

Add linting as pre-commit hook
2 participants