-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
119 lines (104 loc) · 2.75 KB
/
pyproject.toml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[project]
name = "mypy-to-codeclimate"
description = "Standalone tool to convert a mypy output to CodeQuality JSON, for Gitlab or other CIs."
authors = [{ name = "Gabriel Dugny", email = "[email protected]" }]
dependencies = []
requires-python = ">=3.8"
readme = "README.md"
license = { text = "MIT" }
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/GabDug/mypy-to-codeclimate.git"
[project.scripts]
mypy-to-codeclimate = "mypy_to_codeclimate:main"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
plugins = ["sync-pre-commit-lock"]
[tool.pdm.version]
source = "scm"
write_to = "mypy_to_codeclimate/_version.py"
write_template = "__version__: str = \"{}\"\n"
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.1.3",
"black>=23.10.1",
"mypy>=1.6.1",
"pytest>=7.4.3",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"typing-extensions>=4.8.0; python_version < \"3.11\"",
]
[tool.pdm.scripts]
fmt = { cmd = "black .", help = "Run black formatter" }
test = "pytest"
test-cov = { cmd = "pytest --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html --cov-report=term-missing", help = "Run tests with coverage" }
lint = "pre-commit run --all-files"
lint-mypy = { cmd = "mypy src", help = "Run mypy type checker" }
lint-ruff = { cmd = "ruff .", help = "Run ruff linter" }
[tool.black]
line-length = 120
[tool.ruff]
line-length = 120
ignore = ["E501"]
extend-select = [
"E",
"F",
"W",
"TCH",
"I",
"Q000",
"TCH",
"I001",
"S",
"T",
"PTH",
"PYI",
"RET",
"D209",
"D202",
"EM101",
]
[tool.ruff.per-file-ignores]
"tests/*" = ["S101", "PTH"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.mypy]
files = ["src"]
strict = true
strict_concatenate = true
warn_unreachable = true
warn_no_return = true
[tool.pytest.ini_options]
testpaths = ["tests/*"]
[tool.coverage.run]
branch = true
omit = ["*/tests/*"]
include = ["src/*"]
[tool.coverage.report]
fail_under = 80.0
exclude_lines = [
"def __repr__",
"if TYPE_CHECKING:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
'class .*\bProtocol\):',
'@(abc\.)?abstractmethod]',
]