-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit to manage code style & repo QA (#121)
* Add pre-commit to manage code style & repo QA Introduced `.pre-commit-config.yaml` to configure pre-commit hooks, including Black for code formatting and other QA checks. Updated dependencies and environments to include `pre-commit` and `black` for consistent coding standards. pre-commit hooks: * Code formatting by black * Trim trailing whitespace * Ensure that files are either empty, or end with one newline * Confirm that YAML files have parsable syntax * Confirm that TOML files have parsable syntax * Prevent files larger than 500 kB from being committed * Refactor code for consistency & formatting cleanup Code style gardening by the pre-commit hooks, especially black. Also fix CRLF line endings. * Fix mixture of tabs and spaces for indentation WARNING: This module has many other broken code issues in it. Much debugging and modernization will be required if you want to use it.
- Loading branch information
1 parent
ad92639
commit 44b3bad
Showing
136 changed files
with
17,195 additions
and
10,297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Git pre-commit hooks config file | ||
# Only takes effect if you have pre-commit installed in the env, | ||
# and after you run `pre-commit install` | ||
# | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
# Out-of-the-box hooks from the pre-commit org | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
# Code formatting with black | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,4 +264,4 @@ | |
"metadata": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,4 +179,4 @@ | |
"metadata": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1308,4 +1308,4 @@ | |
"metadata": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -778,4 +778,4 @@ | |
"metadata": {} | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1545,4 +1545,4 @@ | |
"metadata": {} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.