Skip to content

Commit fafc50a

Browse files
committed
Add toml formatter to pre-commit
1 parent e14652f commit fafc50a

File tree

2 files changed

+67
-56
lines changed

2 files changed

+67
-56
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json
2+
13
# See https://pre-commit.com for more information
24
# See https://pre-commit.com/hooks.html for more hooks
35
repos:
@@ -47,6 +49,11 @@ repos:
4749
args: ["-i"]
4850
exclude: "numba_dpex/dpnp_iface"
4951
types_or: [c++, c]
52+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
53+
rev: v2.12.0
54+
hooks:
55+
- id: pretty-format-toml
56+
args: [--autofix]
5057
- repo: local
5158
hooks:
5259
- id: pylint

pyproject.toml

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,83 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=42",
5+
"scikit-build>=0.13",
6+
"cmake>=3.18",
7+
"ninja",
8+
"numba>=0.58",
9+
"versioneer-518"
10+
]
11+
112
[tool.black]
213
exclude = "versioneer.py|numba_dpex/_version.py"
314
line-length = 80
415

5-
[tool.isort]
6-
multi_line_output = 3
7-
include_trailing_comma = true
8-
force_grid_wrap = 0
9-
use_parentheses = true
10-
ensure_newline_before_comments = true
11-
line_length = 80
12-
skip = ["versioneer.py", "numba_dpex/_version.py"]
13-
14-
[tool.coverage.run]
15-
branch = true
16-
source = [
17-
"numba_dpex"
16+
[tool.coverage.report]
17+
exclude_lines = [
18+
"pragma: no cover",
19+
"raise NotImplementedError",
20+
"if config.DEBUG:",
21+
"@register_jitable",
22+
"def dpnp_impl"
1823
]
1924
omit = [
20-
"numba_dpex/tests/*",
21-
"numba_dpex/_version.py",
25+
"numba_dpex/tests/*",
26+
"numba_dpex/_version.py"
2227
]
28+
precision = 2
29+
30+
[tool.coverage.run]
31+
branch = true
2332
concurrency = [
24-
"multiprocessing",
33+
"multiprocessing"
2534
]
26-
parallel = true
27-
28-
[tool.coverage.report]
29-
precision = 2
3035
omit = [
31-
"numba_dpex/tests/*",
32-
"numba_dpex/_version.py",
36+
"numba_dpex/tests/*",
37+
"numba_dpex/_version.py"
3338
]
34-
exclude_lines = [
35-
"pragma: no cover",
36-
"raise NotImplementedError",
37-
"if config.DEBUG:",
38-
"@register_jitable",
39-
"def dpnp_impl",
39+
parallel = true
40+
source = [
41+
"numba_dpex"
4042
]
4143

42-
[tool.versioneer]
43-
VCS = "git"
44-
style = "pep440"
45-
versionfile_source = "numba_dpex/_version.py"
46-
versionfile_build = "numba_dpex/_version.py"
47-
parentdir_prefix = ""
44+
[tool.isort]
45+
ensure_newline_before_comments = true
46+
force_grid_wrap = 0
47+
include_trailing_comma = true
48+
line_length = 80
49+
multi_line_output = 3
50+
skip = ["versioneer.py", "numba_dpex/_version.py"]
51+
use_parentheses = true
4852

4953
[tool.pylint]
5054
disable = [
51-
"fixme"
55+
"fixme"
5256
]
5357

54-
[build-system]
55-
requires = [
56-
"setuptools>=42",
57-
"scikit-build>=0.13",
58-
"cmake>=3.18",
59-
"ninja",
60-
"numba>=0.58",
61-
"versioneer-518"
62-
]
63-
build-backend = "setuptools.build_meta"
64-
6558
[tool.pytest.ini_options]
66-
minversion = "6.0"
67-
norecursedirs= [
68-
".*", "*.egg*", "build", "dist", "conda-recipe",
69-
]
70-
xfail_strict = true
7159
addopts = [
72-
"--disable-warnings",
73-
"--strict",
74-
"--durations=20",
75-
"-ra -vv",
60+
"--disable-warnings",
61+
"--strict",
62+
"--durations=20",
63+
"-ra -vv"
64+
]
65+
minversion = "6.0"
66+
norecursedirs = [
67+
".*",
68+
"*.egg*",
69+
"build",
70+
"dist",
71+
"conda-recipe"
7672
]
7773
testpaths = [
78-
"numba_dpex/tests"
74+
"numba_dpex/tests"
7975
]
76+
xfail_strict = true
77+
78+
[tool.versioneer]
79+
VCS = "git"
80+
parentdir_prefix = ""
81+
style = "pep440"
82+
versionfile_build = "numba_dpex/_version.py"
83+
versionfile_source = "numba_dpex/_version.py"

0 commit comments

Comments
 (0)