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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
Comment on lines +4 to +10
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

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ requires = [
"setuptools_scm[toml]",
]


[tool.setuptools]
packages = ["esmgrids"]

Expand All @@ -43,6 +42,7 @@ write_to = "esmgrids/_version.py"
devel = [
"flake8",
"black",
"pre-commit"
]
test = [
"pytest",
Expand Down
Loading