116 lines
3.0 KiB
TOML
116 lines
3.0 KiB
TOML
[build-system]
|
|
# Minimum requirements for the build system to execute.
|
|
requires = [
|
|
"setuptools",
|
|
"wheel",
|
|
"Cython>=0.29.33",
|
|
"numpy>=1.25",
|
|
"scipy>=1.6.0",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
target_version = ['py39', 'py310', 'py311']
|
|
preview = true
|
|
exclude = '''
|
|
/(
|
|
\.eggs # exclude a few common directories in the
|
|
| \.git # root of the project
|
|
| \.mypy_cache
|
|
| \.vscode
|
|
| build
|
|
| dist
|
|
| doc/tutorial
|
|
| doc/_build
|
|
| doc/auto_examples
|
|
| sklearn/externals
|
|
| asv_benchmarks/env
|
|
)/
|
|
'''
|
|
|
|
[tool.ruff]
|
|
# all rules can be found here: https://beta.ruff.rs/docs/rules/
|
|
select = ["E", "F", "W", "I"]
|
|
|
|
# max line length for black
|
|
line-length = 88
|
|
target-version = "py38"
|
|
|
|
ignore=[
|
|
# space before : (needed for how black formats slicing)
|
|
"E203",
|
|
# do not assign a lambda expression, use a def
|
|
"E731",
|
|
# do not use variables named 'l', 'O', or 'I'
|
|
"E741",
|
|
]
|
|
|
|
exclude=[
|
|
".git",
|
|
"__pycache__",
|
|
"dist",
|
|
"sklearn/externals",
|
|
"doc/_build",
|
|
"doc/auto_examples",
|
|
"doc/tutorial",
|
|
"build",
|
|
"asv_benchmarks/env",
|
|
"asv_benchmarks/html",
|
|
"asv_benchmarks/results",
|
|
"asv_benchmarks/benchmarks/cache",
|
|
]
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
# It's fine not to put the import at the top of the file in the examples
|
|
# folder.
|
|
"examples/*"=["E402"]
|
|
"doc/conf.py"=["E402"]
|
|
|
|
|
|
[tool.cython-lint]
|
|
# Ignore the same error codes as ruff
|
|
# + E501 (line too long) because keeping it < 88 in cython
|
|
# often makes code less readable.
|
|
ignore = [
|
|
# multiple spaces/tab after comma
|
|
'E24',
|
|
# space before : (needed for how black formats slicing)
|
|
'E203',
|
|
# line too long
|
|
'E501',
|
|
# do not assign a lambda expression, use a def
|
|
'E731',
|
|
# do not use variables named 'l', 'O', or 'I'
|
|
'E741',
|
|
# line break before binary operator
|
|
'W503',
|
|
# line break after binary operator
|
|
'W504',
|
|
]
|
|
# Exclude files are generated from tempita templates
|
|
exclude= '''
|
|
(
|
|
asv_benchmarks/
|
|
| sklearn/_loss/_loss.pyx
|
|
| sklearn/linear_model/_sag_fast.pyx
|
|
| sklearn/linear_model/_sgd_fast.pyx
|
|
| sklearn/utils/_seq_dataset.pyx
|
|
| sklearn/utils/_seq_dataset.pxd
|
|
| sklearn/utils/_weight_vector.pyx
|
|
| sklearn/utils/_weight_vector.pxd
|
|
| sklearn/metrics/_dist_metrics.pyx
|
|
| sklearn/metrics/_dist_metrics.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_argkmin.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_argkmin.pyx
|
|
| sklearn/metrics/_pairwise_distances_reduction/_argkmin_classmode.pyx
|
|
| sklearn/metrics/_pairwise_distances_reduction/_base.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_base.pyx
|
|
| sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx
|
|
| sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer.pyx
|
|
| sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pxd
|
|
| sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors.pyx
|
|
)
|
|
'''
|