-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from K-dash/feature/introduce-pre-commit-and-u…
…pdate-docs Introduce pre-commit and update documentation
- Loading branch information
Showing
7 changed files
with
51 additions
and
38 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
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,10 @@ | ||
repos: | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.4.6 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ ., --fix, --diff ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
args: [ . ] |
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ruff==0.4.6 | ||
pytest==8.2.1 | ||
pytest-cov==5.0.0 | ||
pre-commit==3.7.1 |
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 |
---|---|---|
@@ -1,15 +1,10 @@ | ||
# Styling | ||
|
||
## Code Style and Quality | ||
|
||
The [PEP 8](https://realpython.com/python-pep8/) styling convention is used. | ||
|
||
To make sure you are following it, you can install [black](https://pypi.org/project/black/) | ||
|
||
`pip install black` | ||
|
||
To run black: | ||
This is achieved using the ruff Linter and Formatter. | ||
|
||
`black .` | ||
The Linter and Formatter are automatically executed before committing via pre-commit. | ||
|
||
On a push/pull request, git will run `black .` for you! | ||
If you want to run the Linter and Formatter at any time, execute `pre-commit run --all-files`. |
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
5879033
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report