Skip to content

Commit a1f003b

Browse files
committed
Add hooks for code checking on commit
1 parent c89e7d3 commit a1f003b

File tree

4 files changed

+177
-49
lines changed

4 files changed

+177
-49
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[settings]
22
profile=hug
3-
src_paths=isort,test

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: local
5+
hooks:
6+
- id: yapf
7+
name: yapf
8+
stages: [commit]
9+
language: system
10+
entry: pipenv run yapf -ir .
11+
types: [python]
12+
13+
- id: isort
14+
name: isort
15+
stages: [commit]
16+
language: system
17+
entry: pipenv run isort .
18+
types: [python]
19+
20+
- id: pylint
21+
name: pylint
22+
stages: [commit]
23+
language: system
24+
entry: pipenv run pylint msgraphcore --disable=W --rcfile=.pylintrc
25+
types: [python]

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name = "pypi"
55

66
[packages] # Packages required to run the application
77
requests = "==2.23.0"
8+
pre-commit = "==2.10.1"
89

910
[dev-packages] # Packages required to develop the application
1011
coverage = "==5.0.3"

Pipfile.lock

Lines changed: 151 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)