forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
134 lines (121 loc) · 3.55 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
[tool.pytest.ini_options]
# Don't run the tests marked as slow by default.
addopts = "-m 'not slow'"
# 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",
]
norecursedirs = [
"sympy/parsing/autolev/test-examples",
]
markers = [
"nocache_fail",
]
[tool.ruff]
# Enable Pyflakes `E` and `F` codes by default.
select = [
"C40",
"C419",
"E",
"F",
"PIE810",
"SIM101",
]
# Ignore rules that currently fail on the SymPy codebase
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)
"E703", # Statement ends with an unnecessary 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()`
"E722", # Do not use bare `except`
"E731", # Do not assign a `lambda` expression, use a `def`
"E741", # Ambiguous variable name: `<VARIABLE>`
"E743", # Ambiguous function name: `<FUNCTION>`
"F401", # `<TYPE>` imported but unused
"F403", # `from <MODULE> import *` used; unable to detect undefined names
"F405", # `<TYPE>` may be undefined, or defined from star imports: `<MODULE>`
"F523", # `.format` call has unused arguments at position(s): <INDEX>
"F601", # Dictionary key literal `'<KEY>'` repeated
"F811", # Redefinition of unused `<VARIABLE>` from line <LINE>
"F821", # Undefined name `VARIABLE`
"F823", # Local variable `VARIABLE` referenced before assignment
"F841", # Local variable `VARIABLE` is assigned to but never used
]
# 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.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Per-file ignores currently specified in the flake8 configuration
[tool.ruff.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.*",
"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