-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
908bb55
commit e2d601a
Showing
2 changed files
with
67 additions
and
7 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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
default_language_version: | ||
python: python3.9 | ||
python: python3 | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
rev: v4.4.0 | ||
hooks: | ||
# list of supported hooks: https://pre-commit.com/hooks.html | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-private-key | ||
|
||
# python code formatting | ||
# python code formatting/linting | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
# Ruff version. | ||
rev: "v0.0.253" | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black | ||
args: [--line-length, "100"] | ||
|
||
# yaml formatting | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.0-alpha.0 | ||
rev: v3.0.0-alpha.4 | ||
hooks: | ||
- id: prettier | ||
types: [yaml] |
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,56 @@ | ||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. | ||
select = ["E", "F", "D", "I"] | ||
ignore = ["D200","D202","D210","D212","D415","D105",] | ||
|
||
# Allow autofix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["A", "B", "C", "D", "E", "F", "I"] | ||
unfixable = [] | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".hg", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
"tests", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 100 | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
# Assume Python 3.10. | ||
target-version = "py310" | ||
fix = false | ||
# Group violations by containing file. | ||
format = "github" | ||
ignore-init-module-imports = true | ||
|
||
[mccabe] | ||
# Unlike Flake8, default to a complexity level of 10. | ||
max-complexity = 10 | ||
|
||
[pydocstyle] | ||
# Use Google-style docstrings. | ||
convention = "google" | ||
|
||
[per-file-ignores] | ||
"__init__.py" = ["F401", "E402"] |