-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start using nox and pre-commit, linted code
- Loading branch information
1 parent
e58a375
commit b40aae9
Showing
46 changed files
with
649 additions
and
206 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 |
---|---|---|
|
@@ -142,4 +142,4 @@ cython_debug/ | |
benchmarks | ||
|
||
errors | ||
tmp | ||
tmp |
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,104 @@ | ||
# Skip execution of one or more hooks using the SKIP environment variable: | ||
# $ SKIP=pylint git commit -m "foo" | ||
# $ SKIP=mypy,pylint pre-commit run --all-files | ||
# | ||
# If want to disable all hooks while committing, use the --no-verify/-n option: | ||
# $ git commit -n -m "foo" | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: check-case-conflict | ||
- id: check-yaml | ||
- id: check-merge-conflict | ||
- id: check-vcs-permalinks | ||
- id: detect-private-key | ||
- id: debug-statements | ||
- id: check-docstring-first | ||
- id: check-toml | ||
- repo: https://github.com/DavidAnson/markdownlint-cli2 | ||
rev: v0.8.1 | ||
hooks: | ||
- id: markdownlint-cli2-fix | ||
name: markdownlint-cli2-fix (in place fixes) | ||
- repo: https://github.com/leoll2/copyright_notice_precommit | ||
rev: 0.1.1 | ||
hooks: | ||
- id: copyright-notice | ||
args: [--notice=COPYRIGHT] | ||
files: python | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.10.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
# exclude: *fixtures | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.2.1 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- --in-place | ||
- --expand-star-imports | ||
- --remove-all-unused-imports | ||
- --ignore-init-module-imports | ||
- --remove-duplicate-keys | ||
- --remove-unused-variables | ||
- --remove-rhs-for-unused-variables | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (black profile, in place fixes) | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/DanielNoord/pydocstringformatter | ||
rev: v0.7.3 | ||
hooks: | ||
- id: pydocstringformatter | ||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.5.0 | ||
hooks: | ||
- id: yesqa | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
name: black (in place fixes) | ||
# args: [--diff, --check] | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
# language_version: python3.11 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [Flake8-pyproject] | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.5 | ||
hooks: | ||
- id: bandit | ||
name: bandit (checksig) | ||
exclude: ".*test.*" | ||
language: python | ||
types: [python] | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.5 | ||
hooks: | ||
- id: bandit | ||
name: bandit (tests) | ||
# for the test folder disable | ||
# B101, Test for use of assert | ||
args: ["--skip", "B101,B311"] | ||
exclude: checksig | ||
language: python | ||
types: [python] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.5.1 | ||
hooks: | ||
- id: mypy |
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
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
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,5 +1,5 @@ | ||
"""Expception classes""" | ||
"""Expception classes.""" | ||
|
||
|
||
class MissingPrevoutError(ValueError): | ||
pass | ||
pass |
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
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
Oops, something went wrong.