Skip to content

Commit 8506c2b

Browse files
committed
Add coverage config to pyproject.toml
1 parent 68d534d commit 8506c2b

File tree

3 files changed

+68
-47
lines changed

3 files changed

+68
-47
lines changed

.coveragerc

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

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,16 @@ repos:
3434
- flake8-django
3535
- flake8-length
3636
- flake8-logging-format
37+
38+
- repo: https://github.com/tox-dev/pyproject-fmt
39+
rev: v2.5.0
40+
hooks:
41+
- id: pyproject-fmt
42+
43+
- repo: https://github.com/rstcheck/rstcheck
44+
rev: v6.2.4
45+
hooks:
46+
- id: rstcheck
47+
additional_dependencies:
48+
- sphinx==6.1.3
49+
- tomli==2.0.1

pyproject.toml

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
11
[tool.black]
22
exclude = [
3-
".git",
4-
".hg",
5-
".tox",
6-
"venv",
7-
".venv",
8-
"_build",
9-
"build",
10-
"dist"
3+
".git",
4+
".hg",
5+
".tox",
6+
"venv",
7+
".venv",
8+
"_build",
9+
"build",
10+
"dist",
1111
]
1212

13-
[tool.djlint]
14-
ignore="H023,T003,H006,H031,D018,H021,H025"
15-
profile="django"
16-
1713
[tool.ruff]
14+
line-length = 119
1815
exclude = [
19-
".env",
20-
".venv",
21-
"**/migrations/**",
22-
]
23-
lint.ignore = [
24-
"E501", # line too long
25-
"F403", # 'from module import *' used; unable to detect undefined names
26-
"E701", # multiple statements on one line (colon)
27-
"F401", # module imported but unused
16+
"**/migrations/**",
17+
".env",
18+
".venv",
2819
]
29-
line-length = 119
3020
lint.select = [
31-
"I",
32-
"E",
33-
"F",
34-
"W",
21+
"E",
22+
"F",
23+
"I",
24+
"W",
25+
]
26+
27+
lint.ignore = [
28+
"E501", # line too long
29+
"E701", # multiple statements on one line (colon)
30+
"F401", # module imported but unused
31+
"F403", # 'from module import *' used; unable to detect undefined names
3532
]
3633

3734
[tool.isort]
@@ -65,7 +62,12 @@ known_django = "django"
6562
[tool.flake8]
6663
max-line-length = 120
6764
select = [
68-
"C", "E" ,"F", "W", "B", "B950"
65+
"C",
66+
"E",
67+
"F",
68+
"W",
69+
"B",
70+
"B950",
6971
]
7072
exclude = [
7173
"*.egg-info",
@@ -84,3 +86,29 @@ exclude = [
8486
"tmp",
8587
]
8688

89+
[tool.coverage.run]
90+
branch = true
91+
source = [ "djangocms_frontend" ]
92+
omit = [
93+
"djangocms_frontend/migrations/*",
94+
"djangocms_frontend/management/*",
95+
"*/foundation6.py",
96+
"tests/*",
97+
]
98+
99+
[tool.coverage.report]
100+
exclude_lines = [
101+
"pragma: no cover",
102+
"def __repr__",
103+
"if self.debug:",
104+
"if settings.DEBUG",
105+
"raise AssertionError",
106+
"raise NotImplementedError",
107+
"if 0:",
108+
"if __name__ == .__main__.:",
109+
]
110+
ignore_errors = true
111+
112+
[tool.djlint]
113+
ignore = "H023,T003,H006,H031,D018,H021,H025"
114+
profile = "django"

0 commit comments

Comments
 (0)