forked from sqlalchemy/sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
147 lines (120 loc) · 3.67 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
"cython>=0.29.24; python_implementation == 'CPython'", # Skip cython when using pypy
]
[tool.black]
line-length = 79
target-version = ['py37']
[tool.zimports]
black-line-length = 79
keep-unused-type-checking = true
[tool.slotscheck]
exclude-modules = '^sqlalchemy\.testing'
[tool.pytest.ini_options]
addopts = "--tb native -v -r sfxX --maxfail=250 -p warnings -p logging --strict-markers"
norecursedirs = "examples build doc lib"
python_files = "test_*.py"
minversion = "6.2"
filterwarnings = [
# NOTE: additional SQLAlchemy specific filters in
# sqlalchemy/testing/warnings.py. SQLAlchemy modules cannot be named
# here as pytest loads them immediately, which breaks coverage as well
# as sys.path adjustments in conftest.py
"error::DeprecationWarning:test",
"error::DeprecationWarning:sqlalchemy"
]
markers = [
"memory_intensive: memory / CPU intensive suite tests",
"mypy: mypy integration / plugin tests",
"timing_intensive: time-oriented tests that are sensitive to race conditions",
"backend: tests that should run on all backends; typically dialect-sensitive",
"sparse_backend: tests that should run on multiple backends, not necessarily all",
]
[tool.pyright]
reportPrivateUsage = "none"
reportUnusedClass = "none"
reportUnusedFunction = "none"
reportTypedDictNotRequiredAccess = "warning"
#reportIncompatibleMethodOverride = "error"
[tool.mypy]
mypy_path = "./lib/"
show_error_codes = true
strict = true
incremental = true
[[tool.mypy.overrides]]
# ad-hoc ignores
module = [
"sqlalchemy.engine.reflection", # interim, should be strict
# TODO for strict:
"sqlalchemy.ext.asyncio.*",
"sqlalchemy.ext.automap",
"sqlalchemy.ext.compiler",
"sqlalchemy.ext.declarative.*",
"sqlalchemy.ext.mutable",
"sqlalchemy.ext.horizontal_shard",
# TODO for non-strict:
"sqlalchemy.ext.baked",
"sqlalchemy.ext.instrumentation",
"sqlalchemy.ext.indexable",
"sqlalchemy.ext.orderinglist",
"sqlalchemy.ext.serializer",
# not yet classified:
"sqlalchemy.orm.*",
"sqlalchemy.dialects.*",
"sqlalchemy.cyextension.*",
"sqlalchemy.future.*",
"sqlalchemy.testing.*",
]
warn_unused_ignores = false
ignore_errors = true
# strict checking
[[tool.mypy.overrides]]
module = [
# packages
"sqlalchemy.connectors.*",
"sqlalchemy.event.*",
"sqlalchemy.ext.*",
"sqlalchemy.sql.*",
"sqlalchemy.engine.*",
"sqlalchemy.pool.*",
# modules
"sqlalchemy.events",
"sqlalchemy.exc",
"sqlalchemy.inspection",
"sqlalchemy.schema",
"sqlalchemy.types",
]
warn_unused_ignores = false
ignore_errors = false
strict = true
# partial checking
[[tool.mypy.overrides]]
module = [
"sqlalchemy.engine.cursor",
"sqlalchemy.engine.default",
"sqlalchemy.sql.base",
"sqlalchemy.sql.coercions",
"sqlalchemy.sql.compiler",
"sqlalchemy.sql.crud",
"sqlalchemy.sql.ddl", # would be nice as strict
"sqlalchemy.sql.elements", # would be nice as strict
"sqlalchemy.sql.functions", # would be nice as strict, requires sqltypes
"sqlalchemy.sql.lambdas",
"sqlalchemy.sql.naming",
"sqlalchemy.sql.selectable", # would be nice as strict
"sqlalchemy.sql.schema", # would be nice as strict
"sqlalchemy.sql.sqltypes", # would be nice as strict
"sqlalchemy.sql.traversals",
"sqlalchemy.sql.util",
"sqlalchemy.util.*",
]
warn_unused_ignores = false
ignore_errors = false
# mostly strict without requiring totally untyped things to be
# typed
strict = true
allow_untyped_defs = true
allow_untyped_calls = true