-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start using pre-commit to maintain this project
- Loading branch information
Showing
13 changed files
with
762 additions
and
531 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,55 @@ | ||
--- | ||
default_language_version: | ||
python: python3 | ||
|
||
exclude: ^(doc/_static/.*|doc/_themes/.*)$ | ||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-merge-conflict # Check for files that contain merge conflict strings. | ||
- id: trailing-whitespace # Trims trailing whitespace. | ||
args: | ||
- --markdown-linebreak-ext=md | ||
- id: mixed-line-ending # Replaces or checks mixed line ending. | ||
args: | ||
- --fix=lf | ||
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline. | ||
- id: check-ast # Simply check whether files parse as valid python. | ||
- id: check-case-conflict # Check for files with names that would conflict on a | ||
# case-insensitive filesystem like MacOS HFS+ or Windows FAT. | ||
- id: check-json # Attempts to load all json files to verify syntax. | ||
- id: check-symlinks # Checks for symlinks which do not point to anything. | ||
- id: debug-statements # Check for debugger imports and py37+ breakpoint() calls in python source. | ||
- id: fix-byte-order-marker # removes UTF-8 byte order marker | ||
- id: forbid-submodules # forbids any submodules in the repository. | ||
- id: fix-encoding-pragma # Remove `# -*- coding: utf-8 -*-` from the top of python files. | ||
args: | ||
- --remove | ||
|
||
# ----- Code Formatting and Analysis ----------------------------------------------------------> | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.2.0" | ||
hooks: | ||
- id: ruff | ||
args: | ||
- --fix | ||
exclude: (.pre-commit-hooks/.*|docs/.*)\.py | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.1.1 | ||
hooks: | ||
- id: black | ||
args: [-l 100] | ||
exclude: src/saf/version.py | ||
|
||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.16.0 | ||
hooks: | ||
- id: blacken-docs | ||
args: [--skip-errors] | ||
files: ^(docs/.*\.rst|.*\.py)$ | ||
additional_dependencies: | ||
- black==24.1.1 | ||
# <---- Code Formatting and Analysis ----------------------------------------------------------- |
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 +1 @@ | ||
# salt-pylint | ||
# salt-pylint |
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 +0,0 @@ | ||
# -*- coding: utf-8 -*- | ||
Oops, something went wrong.