Skip to content

Commit 30f23f5

Browse files
committed
Add pyproject format pre-commit
1 parent 0df3bec commit 30f23f5

File tree

2 files changed

+44
-35
lines changed

2 files changed

+44
-35
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@ repos:
3737
hooks:
3838
- id: clang-format
3939
args: ["-i"]
40+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
41+
rev: v2.12.0
42+
hooks:
43+
- id: pretty-format-toml
44+
args: [--autofix]

pyproject.toml

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,55 @@
22
exclude = "versioneer.py|dpctl/_version.py"
33
line-length = 80
44

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", "dpctl/_version.py"]
5+
[tool.coverage.report]
6+
omit = [
7+
"dpctl/tests/*",
8+
"dpctl/_version.py",
9+
"*/_cython_api*/stringsource"
10+
]
1311

1412
[tool.coverage.run]
13+
branch = true
14+
omit = [
15+
"dpctl/tests/*",
16+
"dpctl/_version.py",
17+
"*/_cython_api*/stringsource"
18+
]
1519
plugins = [
16-
"Cython.Coverage"
20+
"Cython.Coverage"
1721
]
18-
branch = true
1922
source = [
20-
"dpctl"
21-
]
22-
omit = [
23-
"dpctl/tests/*",
24-
"dpctl/_version.py",
25-
"*/_cython_api*/stringsource",
23+
"dpctl"
2624
]
2725

28-
[tool.coverage.report]
29-
omit = [
30-
"dpctl/tests/*",
31-
"dpctl/_version.py",
32-
"*/_cython_api*/stringsource",
33-
]
26+
[tool.isort]
27+
ensure_newline_before_comments = true
28+
force_grid_wrap = 0
29+
include_trailing_comma = true
30+
line_length = 80
31+
multi_line_output = 3
32+
skip = ["versioneer.py", "dpctl/_version.py"]
33+
use_parentheses = true
3434

3535
[tool.pytest.ini.options]
36+
addopts = [
37+
"--junitxml=junit.xml",
38+
"--ignore setup.py",
39+
"--ignore run_test.py",
40+
"--cov-report term-missing",
41+
"--tb native",
42+
"--strict",
43+
"--durations=20",
44+
"-q -ra"
45+
]
3646
markers = [
37-
"broken_complex: mark a test that is skipped due to complex implementation issues in DPC++ compiler",
47+
"broken_complex: mark a test that is skipped due to complex implementation issues in DPC++ compiler"
3848
]
3949
minversion = "6.0"
40-
norecursedirs= [
41-
".*", "*.egg*", "build", "dist", "conda-recipe",
42-
]
43-
addopts = [
44-
"--junitxml=junit.xml",
45-
"--ignore setup.py",
46-
"--ignore run_test.py",
47-
"--cov-report term-missing",
48-
"--tb native",
49-
"--strict",
50-
"--durations=20",
51-
"-q -ra",
50+
norecursedirs = [
51+
".*",
52+
"*.egg*",
53+
"build",
54+
"dist",
55+
"conda-recipe"
5256
]

0 commit comments

Comments
 (0)