forked from pyamg/pyamg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (83 loc) · 2.65 KB
/
pyproject.toml
File metadata and controls
89 lines (83 loc) · 2.65 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"setuptools_scm[toml]==8.3.0",
"pybind11>=2.8.0",
"wheel",
]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
version_file = "pyamg/version.py"
[tool.ruff]
line-length = 92
indent-width = 4
preview = true
exclude = [
"pyamg/version.py",
"pyamg/amg_core/bindthem.py",
]
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"C4", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"N", # pep8-naming
"NPY", # numpy
"PL", # pylint
"PT", # flake8-pytest-style
"UP", # pyupgrade
"W", # pycodestyle
"Q", # flake8-quotes
"RUF", # ruff
]
ignore = [
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"E741", # do not use variables named ‘l’, ‘O’, or ‘I’
"E226", # missing whitespace around arithmetic operator
"E241", # multiple spaces after ','
"N806", # variable in function should be lowercase
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR0917", # too-many-positional
"C901", # complex-structure
"PLR0911", # too-many-return-statements
"PLR2004", # magic-value-comparison
"PLR1702", # too-many-nested-blocks
"PLW2901", # redefined-loop-name
"PLR6201", # literal-membership
"B028", # no-explicit-stacklevel
"PLR6104", # non-augmented-assignment
"NPY002", # numpy-legacy-random
]
[tool.ruff.lint.per-file-ignores]
"pyamg/gallery/tests/test_fem.py" = ["E201", "E202", "E203"]
"test*.py" = ["N802", "N803", "D101", "D102", "D103", "E221", "PLC0415", "PLR6301",
"NPY002"]
"**/tests/__init__.py" = ["D104"]
"docs/logo/pyamg_logo.py" = ["PLR0916"]
"pyamg/util/utils.py" = ["PLC2701"]
"pyamg/amg_core/__init__.py" = ["RUF022"]
[tool.ruff.lint.pep8-naming]
ignore-names = [
# matrix and set-like names
"A", "M", "Dinv", "G", "S", "B", "T", "V", "E", "C", "R", "W", "F", "AggOp",
"U", "Q", "BtBinv", "B_old", "BH", "scale_T", "Cnodes",
"Cpt_params", "get_Cpt_params", "compute_P", "E2V",
"compute_BtBinv", "Atilde", "Findex", "Cindex",
"Bf", "P_I", "I_F", "rho_D_inv_A", "rho_block_D_inv_A",
# well-known methods with acronyms
"CF", "RS", "PMIS", "PMISc", "CLJP", "CLJPc", "CR", "MIS",
"Cpts", "Fpts", "_CRsweep",
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "double"