-
Notifications
You must be signed in to change notification settings - Fork 12
/
.pre-commit-config.yaml
46 lines (46 loc) · 1.33 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: statviz/src/types/generated
- repo: local
hooks:
- id: black
name: Format Python files
entry: black
types: [python]
language: system
require_serial: true
- id: flake8
name: Lint Python files
entry: flake8
types: [python]
language: system
require_serial: true
- id: mypy
name: Run Python type checks
entry: mypy
types_or: [python, pyi]
exclude: back/test
language: system
args: ["--scripts-are-modules"]
require_serial: true
- id: isort
name: Sort Python imports
entry: isort
types_or: [cython, pyi, python]
language: system
require_serial: true
args: ["--filter-files"]
- id: generate-graphql-ts-types
name: Generate GraphQL Typescript definitions
entry: docker-compose
types: [graphql]
language: system
require_serial: true
pass_filenames: false
args: ["run", "--rm", "front", "pnpm", "generate-graphql-ts-types"]