Skip to content

Commit 56e51bd

Browse files
authored
Correct typing of create_client(host, username) (#482)
The parameters `host` and `username` of `create_client` actually do accept None values, as demonstrated by their default values being `None` and the docstring explaining default behavior when not-set. Correcting these types (by marking as Optional) allows users using `dsn` or default behavior to not see type-checking errors.
1 parent ca45ff6 commit 56e51bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clickhouse_connect/driver/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
# pylint: disable=too-many-arguments,too-many-locals,too-many-branches
1515
def create_client(*,
16-
host: str = None,
17-
username: str = None,
16+
host: Optional[str] = None,
17+
username: Optional[str] = None,
1818
password: str = '',
1919
access_token: Optional[str] = None,
2020
database: str = '__default__',

0 commit comments

Comments
 (0)