File tree Expand file tree Collapse file tree 4 files changed +61
-29
lines changed Expand file tree Collapse file tree 4 files changed +61
-29
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/.hypothesis /
2
2
__pycache__ /
3
+
4
+ /.prettier_cache /
Original file line number Diff line number Diff line change 7
7
hooks :
8
8
- id : trailing-whitespace
9
9
- id : end-of-file-fixer
10
- - id : check-yaml
11
10
12
- - repo : https://github.com/psf/black
11
+ - repo : https://github.com/psf/black-pre-commit-mirror
13
12
rev : 24.10.0
14
13
hooks :
15
14
- id : black
16
15
17
- - repo : https://github.com/pycqa/isort
18
- rev : 5.13 .2
16
+ - repo : https://github.com/astral-sh/ruff-pre-commit
17
+ rev : v0.8 .2
19
18
hooks :
20
- - id : isort
19
+ - id : ruff
20
+ args : ["--fix", "--show-fixes"]
21
21
22
- - repo : https://github.com/pycqa/flake8
23
- rev : 7.1.1
22
+ - repo : https://github.com/rbubley/mirrors-prettier
23
+ rev : v3.4.2
24
24
hooks :
25
- - id : flake8
25
+ - id : prettier
26
+ args : ["--cache-location=.prettier_cache/cache"]
26
27
27
- - repo : https://github.com/pre-commit/mirrors-prettier
28
- rev : v4.0.0-alpha.8
28
+ - repo : https://github.com/ComPWA/taplo- pre-commit
29
+ rev : v0.9.3
29
30
hooks :
30
- - id : prettier
31
+ - id : taplo-format
32
+ args : ["--option", "array_auto_collapse=false"]
33
+ - id : taplo-lint
34
+ args : ["--no-schema"]
Original file line number Diff line number Diff line change 1
- [tool .isort ]
2
- profile = " black"
3
- skip_gitignore = true
4
- float_to_top = true
5
- default_section = " THIRDPARTY"
1
+ [tool .ruff ]
2
+ target-version = " py310"
3
+ builtins = [" ellipsis" ]
4
+ exclude = [
5
+ " .git" ,
6
+ " .eggs" ,
7
+ " build" ,
8
+ " dist" ,
9
+ " __pycache__" ,
10
+ ]
11
+ line-length = 100
12
+
13
+ [tool .ruff .lint ]
14
+ # E402: module level import not at top of file
15
+ # E501: line too long - let black worry about that
16
+ # E731: do not assign a lambda expression, use a def
17
+ ignore = [
18
+ " E402" ,
19
+ " E501" ,
20
+ " E731" ,
21
+ ]
22
+ select = [
23
+ " F" , # Pyflakes
24
+ " E" , # Pycodestyle
25
+ " I" , # isort
26
+ " UP" , # Pyupgrade
27
+ " TID" , # flake8-tidy-imports
28
+ " W" ,
29
+ ]
30
+ extend-safe-fixes = [
31
+ " TID252" , # absolute imports
32
+ ]
33
+ fixable = [" I" , " TID252" ]
34
+
35
+ [tool .ruff .lint .flake8-tidy-imports ]
36
+ # Disallow all relative imports.
37
+ ban-relative-imports = " all"
38
+
39
+ [tool .coverage .run ]
40
+ branch = true
41
+
42
+ [tool .coverage .report ]
43
+ show_missing = true
44
+ exclude_lines = [" pragma: no cover" , " if TYPE_CHECKING" ]
You can’t perform that action at this time.
0 commit comments