Skip to content

Commit b08a429

Browse files
Fix mypy typing errors by explicitly exporting Client (#643)
Resolves #567 Previously, importing Client from clickhouse_connect.driver would fail mypy validation with "Module does not explicitly export attribute Client". This occurred because the module didn't define __all__. Added __all__ to explicitly export Client, AsyncClient, create_client, and create_async_client, making these public API symbols clear to type checkers. Co-authored-by: Joe Spadola <joe.spadola@clickhouse.com>
1 parent fe36fd9 commit b08a429

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clickhouse_connect/driver/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from clickhouse_connect.driver.httpclient import HttpClient
1212
from clickhouse_connect.driver.asyncclient import AsyncClient, DefaultThreadPoolExecutor, NEW_THREAD_POOL_EXECUTOR
1313

14+
__all__ = ['Client', 'AsyncClient', 'create_client', 'create_async_client']
15+
1416

1517
# pylint: disable=too-many-arguments,too-many-locals,too-many-branches
1618
def create_client(*,

0 commit comments

Comments
 (0)