Skip to content

Commit

Permalink
Add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 2, 2022
1 parent 817fe2d commit f56795b
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-pr-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
}
}
}' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Get date
Expand Down
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
args: [--target-version=py37]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/sirosen/check-jsonschema
rev: 0.10.2
hooks:
- id: check-github-workflows

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt

ci:
autoupdate_schedule: quarterly
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ test
It does the forking for you! 👍

[![Build Status](https://travis-ci.org/hugovk/test.png?branch=main)](https://travis-ci.org/hugovk/test)



2 changes: 1 addition & 1 deletion sandbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Normal text

..code-block:: Python
import random

More normal text


Expand Down
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python
import sys

from tqdm import tqdm

print(123)

print(sys.version)

from tqdm import tqdm

for i in tqdm(range(1000)):
pass

0 comments on commit f56795b

Please sign in to comment.