-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
203 lines (176 loc) · 3.8 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
[build-system]
requires = [
"setuptools>=61.2",
]
build-backend = "setuptools.build_meta"
[project]
name = "chevah-compat"
version = "1.3.0"
maintainers = [
{ name = "Adi Roiban", email = "[email protected]" },
]
description = "Helpers for running Python code on many OSes."
readme = "README.rst"
requires-python = "~=3.8"
# The runtime dependencies should be relaxed as otherwise it will
# generate conflicts with the code using chevah-compat.
dependencies = [
"zope.interface >= 5.4.0",
"pywin32 >= 305 ; platform_system == 'Windows'",
"python-pam >= 2.0.2 ; platform_system == 'Linux'",
# Used to detect Linux distributions.
"distro >= 1.6.0",
]
[project.license]
text = "BSD"
[project.urls]
Homepage = "https://github.com/chevah/compat"
[project.optional-dependencies]
# These are the deps required to develop.
# Try to pin them as much as possible.
dev = [
"ruff ~= 0.7",
"bunch",
"Twisted==24.10.0",
"incremental",
"service-identity==24.2.0",
"pynose == 1.5.3",
"pytest ~= 8.3",
"coverage ~= 7.5",
"diff_cover == 9.2.0",
"codecov == 2.1.12",
# Required for showing OpenSSL version in test_ci.
"pyOpenSSL",
# Required for some unicode handling.
"unidecode",
"wmi ~= 1.5.1; platform_system == 'Windows'",
]
[project.entry-points."nose.plugins.0.10"]
memory-usage = "chevah_compat.testing.nose_memory_usage:MemoryUsage"
test-time = "chevah_compat.testing.nose_test_timer:TestTimer"
run-reporter = "chevah_compat.testing.nose_run_reporter:RunReporter"
randomly = "chevah_compat.testing.nose_randomly:RandomlyPlugin"
[tool.setuptools]
platforms = [
"any",
]
include-package-data = false
[tool.setuptools.package-dir]
"" = "src"
[tool.setuptools.packages.find]
where = [
"src",
]
namespaces = false
[tool.distutils.bdist_wheel]
universal = 0
# See ruff settings at https://docs.astral.sh/ruff/settings/
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"build-py3",
"dist",
"node_modules",
"site-packages",
]
# Same as Black.
line-length = 80
indent-width = 4
target-version = "py311"
[tool.ruff.lint]
# Still to enable
# ANN flake8-annotations
# ARG flake8-unused-arguments
# B flake8-bugbear
# C90 mccabe
# CPY flake8-copyright - needs preview features
# D pydocstyle
# DTZ flake8-datetimez - need to fix datetime usage
# G flake8-logging-format
# INT flake8-gettext
# N pep8-naming - poor support for interfaces
# PL Pylint
# PT flake8-pytest-style
# PTH flake8-use-pathlib
# Q flake8-quotes
# RET flake8-return
# S flake8-bandit
# SIM flake8-simplify
# SLF flake8-self - check private member access
# TCH flake8-type-checking
select = [
"A",
"AIR",
"ASYNC",
"BLE",
"C4",
"COM",
"E", "W",
"EXE",
"ERA",
"F",
"FA",
"FLY",
"FURB",
"I",
"ICN",
"INP",
"ISC",
"LOG",
"PERF",
"PGH",
"PIE",
"RET",
"RUF",
"PYI",
"RSE",
"SLOT",
"T10",
"T20",
"TD",
"TID",
"TRY",
"YTT",
"UP",
]
ignore = [
"BLE001",
"COM812",
"ISC001",
# TODO: Update code to disable ruff rules.
# https://github.com/chevah/compat/issues/701
"RUF005", # List concatenation
"RUF012", # Class mutable attributes
"TRY003",
"TD002", # We don't use authors tag for todos.
]
external = [
"cover", # Our custom marker for coverage.
]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
line-ending = "lf"
docstring-code-format = false
docstring-code-line-length = "dynamic"