-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
137 lines (123 loc) · 3.5 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[build-system]
requires = ["hatchling>=1.10.0"]
build-backend = "hatchling.build"
[project]
name = "opencv-stubs"
authors = [{ name = "Bagard Hoel" }]
description = "Unofficial stubs for the opencv-python package."
keywords = ["OpenCV", "stubs"]
readme = "README.md"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
]
license = { text = "MIT" }
dynamic = ["version"]
dependencies = ["numpy>=1.21"]
requires-python = ">=3.7"
packages = [{ "include" = "cv2-stubs" }]
[project.urls]
"Homepage" = "https://github.com/hoel-bagard/opencv-stubs"
"Bug Tracker" = "https://github.com/hoel-bagard/opencv-stubs/issues"
[project.optional-dependencies]
dev = ["pre-commit", "pip-tools", "ruff", "pyright"]
build = ["hatch"]
flake8 = [
"flake8",
"flake8-bugbear",
"flake8-comprehensions",
"flake8-docstrings",
"flake8-builtins",
"flake8-quotes",
"pep8-naming",
"flake8-import-order",
"flake8-noqa",
"flake8-broken-line",
"flake8-commas",
"Flake8-pyproject",
]
# I couldn't figure out how to have "opencv or opencv-headless" as dependency, so they are both optional.
opencv = ["opencv-python>=4.7.0"]
opencv-contrib = ["opencv-contrib-python>=4.7.0"]
opencv-headless = ["opencv-python-headless>=4.7.0"]
[tool.hatch.version]
path = "src/cv2-stubs/__init__.pyi"
[tool.hatch.build.targets.sdist]
exclude = ["/.github", "/.pytest_cache", "/build", "/dist", "/docs"]
[tool.hatch.build.targets.wheel]
packages = ["src/cv2-stubs"]
[tool.hatch.envs.pypi.scripts]
# hatch run pypi:publish_test
publish_test = "hatch build --clean && hatch publish -r test"
publish = "hatch build --clean && hatch publish"
[tool.ruff]
select = [
"B",
"C4",
"E",
"I",
"Q",
"UP",
"S",
"BLE",
"COM",
"DTZ",
"PIE",
"PT",
"RSE",
"SIM",
"PTH",
"TRY",
"NPY",
"RUF",
# "ANN",
]
ignore = ["D1", "D401", "D204", "D203", "D213", "S101", "PLR2004"]
line-length = 20000
[tool.ruff.isort]
order-by-type = false
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.pyright]
include = ["src/cv2-stubs"]
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
reportMissingModuleSource = false
reportMissingImports = true
reportMissingTypeStubs = false
reportUnusedImport = false
reportUnusedClass = "warning"
reportUnusedFunction = "warning"
reportUnusedVariable = "warning"
reportDuplicateImport = "warning"
reportUntypedNamedTuple = "warning"
reportUntypedFunctionDecorator = "warning"
reportUntypedClassDecorator = "warning"
reportMissingSuperCall = false
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownVariableType = "warning"
reportUnknownMemberType = false
# reportMissingParameterType = "warning"
# reportMissingTypeArgument = "warning"
reportCallInDefaultInitializer = false
reportUnnecessaryIsInstance = "warning"
reportUnnecessaryCast = "warning"
reportUnnecessaryComparison = "warning"
reportImplicitStringConcatenation = false
reportUnusedCallResult = false
reportUnusedExpression = "warning"
reportUnnecessaryTypeIgnoreComment = "warning"
reportMatchNotExhaustive = "warning"
reportInvalidStringEscapeSequence = false
pythonVersion = "3.10"
pythonPlatform = "Linux"