-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from sarnold/pre-commit
readme and pre-commit updates
- Loading branch information
Showing
10 changed files
with
336 additions
and
26 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,15 @@ | ||
scanner: | ||
diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned. | ||
linter: flake8 # Other option is pycodestyle | ||
|
||
no_blank_comment: False # If True, no comment is made on PR without any errors. | ||
descending_issues_order: True # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file | ||
|
||
pycodestyle: # Same as scanner.linter value. Other option is flake8 | ||
max-line-length: 110 # Default is 79 in PEP 8 | ||
|
||
flake8: | ||
max-line-length: 90 # Default is 79 in PEP 8 | ||
exclude: | ||
- tests | ||
- docs |
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,130 @@ | ||
# To install the git pre-commit hook run: | ||
# pre-commit install | ||
# To update the pre-commit hooks run: | ||
# pre-commit install-hooks | ||
exclude: '^(.tox/|docs/|^setup.py$)' | ||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-useless-excludes | ||
- id: check-hooks-apply | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
# - id: check-symlinks | ||
- id: debug-statements | ||
- id: requirements-txt-fixer | ||
- id: fix-encoding-pragma | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: check-toml | ||
- id: check-yaml | ||
exclude: '(conda/meta.yaml|.pep8speaks.yml)' | ||
|
||
# use ffffff (black fork) for single quote normalization | ||
# (otherwise switch to black for double quotes) | ||
- repo: https://github.com/grktsh/ffffff | ||
rev: v2020.8.31 | ||
hooks: | ||
- id: ffffff | ||
name: "Format code (ffffff)" | ||
files: src/ymltoxml/ymltoxml.py | ||
language_version: python3 | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: [--settings-path=pyproject.toml] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.961 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: | ||
- importlib_metadata | ||
- importlib_resources | ||
- munch | ||
- ruamel.yaml | ||
args: | ||
- --follow-imports=normal | ||
- --install-types | ||
- --non-interactive | ||
- --ignore-missing-imports | ||
files: src/ymltoxml/ymltoxml.py | ||
|
||
- repo: "https://github.com/asottile/blacken-docs" | ||
rev: "v1.12.1" | ||
hooks: | ||
- id: "blacken-docs" | ||
name: "Format docs (blacken-docs)" | ||
args: ["-l", "64"] | ||
additional_dependencies: | ||
- "black==21.9b0" | ||
|
||
- repo: https://github.com/PyCQA/doc8 | ||
rev: 0.11.2 | ||
hooks: | ||
- id: doc8 | ||
args: | ||
- '--max-line-length=90' | ||
- '--ignore=D001' | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: rst-backticks | ||
# exclude: ChangeLog\.rst$ | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
files: src/ymltoxml/ymltoxml.py | ||
args: | ||
- --in-place | ||
- --remove-all-unused-imports | ||
- --remove-duplicate-keys | ||
- --remove-unused-variables | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
files: src/ymltoxml/ymltoxml.py | ||
additional_dependencies: ["flake8-bugbear"] | ||
|
||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.4 | ||
hooks: | ||
- id: bandit | ||
args: ["-ll", "-q"] | ||
files: src/ymltoxml/ymltoxml.py | ||
|
||
# - repo: https://github.com/lovesegfault/beautysh | ||
# rev: v6.2.1 | ||
# hooks: | ||
# - id: beautysh | ||
|
||
ci: | ||
autofix_commit_msg: | | ||
[pre-commit.ci] auto fixes from pre-commit.com hooks | ||
for more information, see https://pre-commit.ci | ||
autofix_prs: false | ||
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' | ||
autoupdate_schedule: weekly | ||
skip: [] | ||
submodules: false | ||
|
||
# re-running a pull request: you can trigger a re-run on a pull request by | ||
# commenting pre-commit.ci run (must appear on a line by itself). | ||
# skipping push runs: skip a run by putting [skip ci], [ci skip], | ||
# [skip pre-commit.ci], or [pre-commit.ci skip] in the commit message. |
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,4 +1,4 @@ | ||
xmltodict | ||
munch | ||
ruamel.yaml | ||
PyYAML | ||
ruamel.yaml | ||
xmltodict |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
from pathlib import Path | ||
|
||
import xmltodict | ||
|
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 @@ | ||
# -*- coding: utf-8 -*- | ||
from pathlib import Path | ||
|
||
import xmltodict | ||
|
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 @@ | ||
# -*- coding: utf-8 -*- | ||
from ._version import __version__ | ||
|
||
version = __version__ | ||
|
Oops, something went wrong.