Skip to content

Commit

Permalink
pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
Harkirat155 committed Nov 23, 2020
1 parent b88e2ab commit 97fb350
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .pre-commit-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# File introduces automated checks triggered on git events
# to enable run `pip install pre-commit && pre-commit install`

repos:
- repo: local
hooks:
- id: yapf
name: yapf
language: python
entry: yapf
args: [-i, -vv]
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- id: check-merge-conflict
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: sort-simple-yaml
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# File configures YAPF to be used as a git hook with https://github.com/pre-commit/pre-commit

- id: yapf
name: yapf
description: "A formatter for Python files."
entry: yapf
args: [-i] #inplace
language: python
types: [python]

0 comments on commit 97fb350

Please sign in to comment.