forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
153 lines (137 loc) · 3.62 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
[tool.pytest.ini_options]
# Don't run the tests marked as slow by default.
addopts = "-m 'not slow and not tooslow'"
filterwarnings = [
'ignore:More than 20 figures have been opened.*:RuntimeWarning',
'ignore:FigureCanvasAgg is non-interactive, and thus cannot be shown:UserWarning',
]
# Only run tests under the sympy/ directory. Otherwise pytest will attempt to
# collect tests from e.g. the bin/ directory as well.
testpaths = [
"sympy",
"doc/src",
]
# Normalise output of doctests.
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
"FLOAT_CMP",
]
norecursedirs = [
"sympy/parsing/autolev/test-examples",
]
markers = [
"nocache_fail",
"tooslow",
]
[tool.ruff]
# Enable Pyflakes `E` and `F` codes by default.
lint.select = [
"C4",
"E",
"F",
"LOG",
"PIE810",
"PLE",
"PLR1736",
"SIM101",
"TRY002",
]
# Ignore rules that currently fail on the SymPy codebase
lint.ignore = [
"E401", # Multiple imports on one line
"E402", # Module level import not at top of file
"E501", # Line too long (<LENGTH> > 88 characters)
"E701", # Multiple statements on one line (colon)
"E702", # Multiple statements on one line (semicolon)
"E711", # Comparison to `None` should be `cond is not None`
"E712", # Comparison to `<BOOL>` should be `cond is <BOOL>`
"E713", # Test for membership should be `not in`
"E714", # Test for object identity should be `is not`
"E721", # Do not compare types, use `isinstance()`
"E731", # Do not assign a `lambda` expression, use a `def`
"E741", # Ambiguous variable name: `<VARIABLE>`
"E743", # Ambiguous function name: `<FUNCTION>`
]
# Exclude paths currently excluded in the flake8 configuration
exclude = [
"sympy/assumptions/*generated.py",
"sympy/core/*_generated.py",
"sympy/parsing/latex/_antlr/*",
"sympy/parsing/autolev/_antlr/*",
"sympy/parsing/autolev/test-examples/*",
"sympy/integrals/rubi/*",
]
# Black default, although irrelevant with E501 ignored
line-length = 88
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Per-file ignores currently specified in the flake8 configuration
[tool.ruff.lint.per-file-ignores]
"sympy/interactive/session.py" = ["F821"]
# Global mypy settings:
[tool.mypy]
warn_unused_configs = true
exclude = [
"sympy/parsing/autolev/test-examples",
]
# Per module settings:
[[tool.mypy.overrides]]
module = [
"sympy.parsing.latex._antlr.*",
"sympy.parsing.autolev._antlr.*",
"sympy.benchmarks.*",
"sympy.plotting.pygletplot.*",
]
ignore_errors = true
# Third-party untyped code:
[[tool.mypy.overrides]]
module = [
"antlr4.*",
"Cython.*",
"flint.*",
"gmpy.*",
"gmpy2.*",
"IPython.*",
"lxml.*",
"matchpy.*",
"matplotlib.*",
"mpmath.*",
"numpy.*",
"PIL.*",
"pycosat.*",
"pyglet.*",
"pymc.*",
"pymc3.*",
"python-sat.*",
"pytest.*",
"_pytest.*",
"sage.*",
"scipy.*",
"symengine.*",
"aesara.*",
"xml.*",
"pydy.*",
"theano.*",
"multiset.*",
"pysat.*",
]
ignore_missing_imports = true
# pyright type checker settings:
[tool.pyright]
include = ["sympy"]
# This complains when self or cls is not used as the parameter name for an
# instance method or class method. Since this is used a lot in SymPy we disable
# this check.
reportSelfClsParameterName = false
[tool.slotscheck]
strict-imports = true
exclude-modules = '''
(
sympy.parsing.latex._antlr
|sympy.parsing.autolev._antlr
|sympy.galgebra
|sympy.plotting.pygletplot
)
'''