Skip to content

Commit ed07a35

Browse files
authored
Add strict_concatenate to mypy config (#422)
Automated changes: Added strict_concatenate = true to mypy config
1 parent 9f16316 commit ed07a35

File tree

1 file changed

+55
-27
lines changed

1 file changed

+55
-27
lines changed

pyproject.toml

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
[build-system]
2-
requires = ["setuptools>=64"]
2+
requires = [
3+
"setuptools>=64",
4+
]
35
build-backend = "setuptools.build_meta"
46

57
[project]
68
name = "sqlalchemy-hana"
79
version = "3.0.3"
810
description = "SQLAlchemy dialect for SAP HANA"
9-
keywords = ["sqlalchemy", "sap", "hana"]
11+
keywords = [
12+
"sqlalchemy",
13+
"sap",
14+
"hana",
15+
]
1016
requires-python = "~=3.9"
1117
readme = "README.rst"
12-
authors = [{ name = "Christoph Heer", email = "christoph.heer@sap.com" }]
18+
authors = [
19+
{ name = "Christoph Heer", email = "christoph.heer@sap.com" },
20+
]
1321
maintainers = [
1422
{ name = "Christoph Heer", email = "christoph.heer@sap.com" },
1523
{ name = "Kai Harder", email = "kai.harder@sap.com" },
@@ -31,9 +39,14 @@ classifiers = [
3139
"Topic :: Software Development :: Libraries :: Python Modules",
3240
"Typing :: Typed",
3341
]
34-
dependencies = ["sqlalchemy>=1.4.0,<3", "hdbcli~=2.10"]
42+
dependencies = [
43+
"sqlalchemy>=1.4.0,<3",
44+
"hdbcli~=2.10",
45+
]
3546
license = "Apache-2.0"
36-
license-files = ["LICENSE"]
47+
license-files = [
48+
"LICENSE",
49+
]
3750

3851
[project.optional-dependencies]
3952
dev = [
@@ -56,7 +69,9 @@ test = [
5669
"diff-cover[toml]==9.6.0",
5770
"pytest-randomly==3.16.0",
5871
]
59-
alembic = ["alembic~=1.12"]
72+
alembic = [
73+
"alembic~=1.12",
74+
]
6075

6176
[project.entry-points."sqlalchemy.dialects"]
6277
hana = "sqlalchemy_hana.dialect:HANAHDBCLIDialect"
@@ -68,26 +83,29 @@ Repository = "https://github.com/SAP/sqlalchemy-hana"
6883
Changelog = "https://github.com/SAP/sqlalchemy-hana/blob/main/CHANGES.rst"
6984

7085
[tool.setuptools.packages.find]
71-
include = ["sqlalchemy_hana"]
86+
include = [
87+
"sqlalchemy_hana",
88+
]
7289

7390
[tool.setuptools.package-data]
74-
sqlalchemy_hana = ["py.typed"]
91+
sqlalchemy_hana = [
92+
"py.typed",
93+
]
7594

7695
[tool.isort]
7796
profile = "black"
78-
add_imports = ["from __future__ import annotations"]
97+
add_imports = [
98+
"from __future__ import annotations",
99+
]
79100

80101
[tool.pytest.ini_options]
81102
log_level = "DEBUG"
82103
xfail_strict = true
83104
filterwarnings = [
84-
# all warnings are errors
85105
"error",
86-
# created by SQLAlchemy
87106
"ignore:There is no current event loop:DeprecationWarning",
88107
]
89108
markers = [
90-
# used by sqlalchemy; registered to avoid warnings
91109
"backend: used by sqlalchemy",
92110
"mypy: used by sqlalchemy",
93111
]
@@ -101,28 +119,23 @@ fail_under = 80
101119
max-line-length = 100
102120

103121
[tool.pylint."messages control"]
104-
enable = ["all"]
122+
enable = [
123+
"all",
124+
]
105125
disable = [
106-
# ignore fixme comments
107126
"fixme",
108-
# allow disables
109127
"locally-disabled",
110128
"suppressed-message",
111129
"file-ignored",
112-
# allow missing docstrings
113130
"missing-class-docstring",
114131
"missing-function-docstring",
115-
# many false positives
116132
"abstract-method",
117133
"assignment-from-none",
118-
# we need them for the dialect
119134
"unused-argument",
120135
"protected-access",
121136
"not-callable",
122137
"no-member",
123-
# explicit is better than implicit
124138
"use-implicit-booleaness-not-comparison-to-zero",
125-
# ignore too-* checks
126139
"too-many-ancestors",
127140
"too-few-public-methods",
128141
"too-many-public-methods",
@@ -137,26 +150,41 @@ disable = [
137150
]
138151

139152
[tool.pylint.basic]
140-
good-names = ["visit_TINYINT", "visit_SMALLDECIMAL", "visit_SECONDDATE", "visit_ALPHANUM", "visit_JSON", "visit_REAL_VECTOR", "REAL_VECTOR"]
153+
good-names = [
154+
"visit_TINYINT",
155+
"visit_SMALLDECIMAL",
156+
"visit_SECONDDATE",
157+
"visit_ALPHANUM",
158+
"visit_JSON",
159+
"visit_REAL_VECTOR",
160+
"REAL_VECTOR",
161+
]
141162

142163
[tool.mypy]
143-
# formatting
144164
pretty = true
145165
show_column_numbers = true
146166
show_error_codes = true
147-
# checks
148-
enable_error_code = ["explicit-override", "possibly-undefined", "ignore-without-code", "deprecated"]
149-
deprecated_calls_exclude=["sqlalchemy_hana"]
167+
enable_error_code = [
168+
"explicit-override",
169+
"possibly-undefined",
170+
"ignore-without-code",
171+
"deprecated",
172+
]
173+
deprecated_calls_exclude = [
174+
"sqlalchemy_hana",
175+
]
150176
strict_bytes = true
151177
strict = true
152178
strict_optional = true
153179
warn_no_return = true
154180
warn_return_any = false
155181
warn_unreachable = true
156-
# allow calls to untyped functions
157182
disallow_untyped_calls = false
158183
disallow_untyped_decorators = false
184+
strict_concatenate = true
159185

160186
[[tool.mypy.overrides]]
161187
ignore_errors = true
162-
module = ["test.*"]
188+
module = [
189+
"test.*",
190+
]

0 commit comments

Comments
 (0)