forked from scipy-lectures/scientific-python-lectures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
73 lines (70 loc) · 2.86 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
[tool.pytest.ini_options]
minversion = "8.2"
doctest_optionflags = "NUMBER NORMALIZE_WHITESPACE ELLIPSIS"
xfail_strict = true
filterwarnings = [
"error",
"ignore:FigureCanvasAgg is non-interactive:UserWarning",
"ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning",
"ignore:'scipy.sparse.linalg.cg' keyword argument:DeprecationWarning",
]
addopts = [
"-ra", "--showlocals", "--strict-markers", "--strict-config",
"--ignore=advanced/advanced_numpy/examples/myobject_test.py",
"--ignore=advanced/interfacing_with_c/ctypes_numpy/test_cos_doubles.py",
"--ignore=advanced/interfacing_with_c/cython_numpy/test_cos_doubles.py",
"--ignore=advanced/interfacing_with_c/numpy_c_api/test_cos_module_np.py",
"--ignore=advanced/interfacing_with_c/numpy_shared/test_cos_doubles.py",
"--ignore=advanced/interfacing_with_c/swig_numpy/test_cos_doubles.py",
"--ignore=intro/scipy/examples/plot_t_test.py",
]
log_cli_level = "info"
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle-error
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FURB", # refurb
"NPY", # NumPy specific rules
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
# "PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
# "RET", # flake8-return
"RUF", # ruff-specific
"SIM", # flake8-simplify
"SIM2", # simplify boolean comparisons
"UP", # pyupgrade
"YTT" # flake8-2020
]
ignore = [
"B006", # Do not use mutable data structures for argument defaults
"B007", # Loop control variable {name} not used within loop body
"B018", # Found useless expression. Either assign it to a variable or remove it.
"E402", # Module level import not at top of file
"E501", # Line too long
"E741", # Ambiguous variable name
"E721", # Do not compare types, use `isinstance()`
"E731", # Do not assign a `lambda` expression, use a `def`
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ISC001", # Conflicts with formatter
"NPY002", # Replace legacy np.random.{method_name} call with np.random.Generator
"PD002", # inplace=True should be avoided; it has inconsistent behavior
"PLR", # pylint-refactor
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"PLW0127", # Self-assignment of variable {name}
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
"RUF005", # Consider {expression} instead of concatenation
"RUF015", # Prefer next({iterable}) over single element slice
"SIM115" # Use context handler for opening files
]
[tool.ruff.format]
docstring-code-format = true