-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
220 lines (193 loc) · 4.21 KB
/
pyproject.toml
File metadata and controls
220 lines (193 loc) · 4.21 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
[build-system]
requires = ["flot"]
build-backend = "flot.buildapi"
[project]
name = "flot"
version = "0.7.3"
description = "Flot is a simple tool to easily build multiple packages (wheel and sdist) from a single repo without having to create a subdir or another repo for each package, and by simply listing which files to include."
authors = [
{name = "Philippe Ombredanne", email = "pombredanne@nexb.com"},
{name = "Thomas Kluyver", email = "thomas@kluyver.me.uk"},
]
maintainers = [
{name = "Philippe Ombredanne", email = "pombredanne@nexb.com"},
]
dependencies = [
"tomli; python_version < '3.11'",
]
requires-python = ">=3.10"
readme = "README.rst"
license = {text = "BSD-3-Clause AND BSD-2-clause"}
classifiers = ["Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.optional-dependencies]
test = [
"testpath",
"responses",
"pytest>=2.7.3",
"pytest-cov",
"tomli",
# Validation
"flake8",
"doc8",
"black",
"isort",
"bump-my-version",
"tox",
"twine",
"sphinx",
"sphinxcontrib_github_alt",
"sphinx-rtd-theme"
]
[project.urls]
Source = "https://github.com/nexB/flot"
[project.scripts]
flot = "flot:main"
[tool.flot]
includes = ["flot/**/*"]
metadata_files = ["LICENSE"]
editable_paths = ["."]
sdist_extra_includes = [
"tests/**/*",
"docs/**/*",
"tox.ini",
"README.rst",
".gitignore",
]
sdist_extra_excludes = [
"docs/_build/**/*",
]
[tool.bumpversion]
current_version = "0.7.3"
allow_dirty = true
files = [
{ filename = "flot/__init__.py" },
{ filename = "pyproject.toml" },
{ filename = "docs/conf.py" },
]
[tool.black]
line-length = 100
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
(
^/venv/.*
| ^/tests/data/.*
)
'''
[tool.isort]
profile = "black"
force_single_line = "True"
skip_gitignore = true
line_length = 100
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
skip = "docs,venv,tmp,build,dist,tests/data"
[tool.pytest.ini_options]
norecursedirs = [
".git",
"bin",
"dist",
"build",
"_build",
"etc",
"local",
"ci",
"docs",
"man",
"share",
"samples",
".cache",
".settings",
"Include",
"include",
"Lib",
"lib",
"lib64",
"Lib64",
"Scripts",
"thirdparty",
"tmp",
"venv",
".venv",
"tests/data",
"*/tests/test_data",
".eggs",
"src/*/data",
"tests/*/data"
]
python_files = "*.py"
python_classes = "Test"
python_functions = "test"
addopts = [
"-rfExXw",
"--strict-markers",
"--doctest-modules",
]
[tool.ruff]
line-length = 100
extend-exclude = []
target-version = "py310"
include = [
"pyproject.toml",
"src/**/*.py",
"etc/**/*.py",
"test/**/*.py",
"tests/**/*.py",
"doc/**/*.py",
"docs/**/*.py",
"*.py",
"."
]
# ignore test data and testfiles: they should never be linted nor formatted
exclude = [
# main style
"**/tests/data/**/*",
# scancode-toolkit
"**/tests/*/data/**/*",
# dejacode, purldb
"**/tests/testfiles/**/*",
# vulnerablecode, fetchcode
"**/tests/*/test_data/**/*",
"**/tests/test_data/**/*",
# django migrations
"**/migrations/**/*"
]
[tool.ruff.lint]
# Rules: https://docs.astral.sh/ruff/rules/
select = [
# "E", # pycodestyle
# "W", # pycodestyle warnings
"D", # pydocstyle
# "F", # Pyflakes
# "UP", # pyupgrade
# "S", # flake8-bandit
"I", # isort
# "C9", # McCabe complexity
]
ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415", "I001"]
[tool.ruff.lint.isort]
force-single-line = true
lines-after-imports = 1
default-section = "first-party"
known-first-party = ["src", "tests", "etc/scripts/**/*.py"]
known-third-party = ["click", "pytest"]
sections = { django = ["django"] }
section-order = [
"future",
"standard-library",
"django",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# Place paths of files to be ignored by ruff here
"tests/*" = ["S101"]
"test_*.py" = ["S101"]
[tool.doc8]
ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"]
max-line-length=100