Skip to content

Commit 67bb654

Browse files
committed
format: introduce pre-commit
1 parent e209a1e commit 67bb654

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

.github/workflows/format.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Format
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
pre-commit:
11+
name: Pre-commit checks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.1.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: requirements-txt-fixer
14+
- id: trailing-whitespace
15+
- id: fix-encoding-pragma
16+
17+
- repo: https://github.com/mgedmin/check-manifest
18+
rev: "0.42"
19+
hooks:
20+
- id: check-manifest
21+
22+
- repo: https://gitlab.com/pycqa/flake8
23+
rev: 3.8.3
24+
hooks:
25+
- id: flake8
26+
additional_dependencies:
27+
- flake8-bugbear
28+
- flake8-import-order

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include *.py
2+
include LICENSE

setup.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
ignore = E203, E231, E501, E722, W503, B950
3+
select = C,E,F,W,B,B9,I
4+
5+
[bdist_wheel]
6+
universal = 1
7+
8+
[check-manifest]
9+
ignore =
10+
.github
11+
.pre-commit-config.yaml
12+
requirements.txt

0 commit comments

Comments
 (0)