Skip to content

Commit d5c0a1b

Browse files
committed
📡 adding pre-commit
1 parent 4193b4a commit d5c0a1b

File tree

4 files changed

+44
-24
lines changed

4 files changed

+44
-24
lines changed

.github/workflows/pre-commit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: pre-commit
2+
3+
on: [push]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
with:
12+
python-version: 3.8
13+
- name: Install pre-commit
14+
run: pip install pre-commit
15+
- name: Run pre-commit
16+
run: pre-commit run --all-files

.github/workflows/pylint.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 23.7.0
10+
hooks:
11+
- id: black
12+
- repo: https://github.com/pre-commit/mirrors-mypy
13+
rev: v1.4.1
14+
hooks:
15+
- id: mypy
16+
args: [--ignore-missing-imports, --follow-imports=skip]
17+
additional_dependencies: [types-requests]
18+
- repo: https://github.com/pre-commit/mirrors-isort
19+
rev: v5.9.3
20+
hooks:
21+
- id: isort
22+
args: [--profile=black]
23+
- repo: https://github.com/PYCQA/flake8
24+
rev: 6.1.0
25+
hooks:
26+
- id: flake8
27+
args: [--max-line-length=88]

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"python.analysis.typeCheckingMode": "basic"
3-
}
3+
}

0 commit comments

Comments
 (0)