Files
connect/pyproject.toml
bec10356fe refactor(cc_sqlalchemy): add type annotations to pass mypy (part of #692) (#807)
* refactor(cc_sqlalchemy): add type annotations

* refactor(cc_sqlalchemy): make TableEngine inherit SchemaItem directly

SchemaItem is SchemaEventTarget + Visitable formalized — TableEngine was
already structurally identical but didn't declare the inheritance, causing
a # type: ignore[arg-type] suppression wherever a TableEngine instance was
passed to Table(). Switching to SchemaItem makes the relationship explicit
and removes the suppression in alembic/impl.py.

Visitable.__init__ was a no-op (delegates to object.__init__); replaced
with super().__init__().

* formatting

---------

Co-authored-by: Joe S <[email protected]>
2026-06-22 16:02:25 -07:00

68 lines
1.3 KiB
TOML

[build-system]
requires = ["setuptools", "cython>=3.1,<4"]
build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
skip = "cp38-* cp39-* pp38-* pp39-*"
[tool.ruff]
target-version = "py310"
line-length = 140
force-exclude = true
extend-exclude = ["clickhouse_connect/driverc"]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
select = [
"E4",
"E7",
"E9",
"F",
"I",
"UP",
"B",
"N",
]
ignore = [
"E501",
"B905",
]
[tool.mypy]
files = ["clickhouse_connect"]
python_version = "3.10"
[[tool.mypy.overrides]]
# Optional dependencies without type stubs and the compiled Cython modules.
module = [
"brotli.*",
"lz4.*",
"orjson.*",
"pandas.*",
"pyarrow.*",
"tzlocal.*",
"ujson.*",
"clickhouse_connect.driverc.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Baseline of modules that do not yet pass type checking (issue #692).
# Remove entries as modules are annotated and pass cleanly.
module = [
"clickhouse_connect.json_impl",
"clickhouse_connect.tools.datagen",
"clickhouse_connect.tools.testing",
]
ignore_errors = true
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
env_files = ["test.env"]
asyncio_default_fixture_loop_scope = "session"
addopts = "-n 4"