From 8d1e54adc9a78f9637c1d2022ca3fa4a11ea1536 Mon Sep 17 00:00:00 2001 From: juliarbkv Date: Wed, 16 Oct 2024 21:38:39 +0300 Subject: [PATCH] readonly type fix --- .../dl_connector_clickhouse/core/clickhouse_base/dto.py | 2 +- .../dl_connector_clickhouse/core/clickhouse_base/target_dto.py | 2 +- .../core/clickhouse_base/us_connection.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/dto.py b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/dto.py index 6aa5d3bea..75d5cbb25 100644 --- a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/dto.py +++ b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/dto.py @@ -27,4 +27,4 @@ class ClickHouseConnDTO(ClickHouseBaseDTO, DefaultSQLDTO): # noqa # TODO CONSIDER: Is really optional endpoint: Optional[str] = attr.ib(kw_only=True) cluster_name: str = attr.ib(kw_only=True) - readonly: int = attr.ib(kw_only=True, default=None) + readonly: Optional[int] = attr.ib(kw_only=True, default=None) diff --git a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/target_dto.py b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/target_dto.py index 24d5dfe99..29a2e5f9f 100644 --- a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/target_dto.py +++ b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/target_dto.py @@ -20,7 +20,7 @@ class BaseClickHouseConnTargetDTO(BaseSQLConnTargetDTO, BaseAiohttpConnTargetDTO disable_value_processing: bool = attr.ib() secure: bool = attr.ib(kw_only=True, default=False) ssl_ca: Optional[str] = attr.ib(kw_only=True, default=None) - readonly: int = attr.ib(kw_only=True, default=None) + readonly: Optional[int] = attr.ib(kw_only=True, default=None) # TODO remove in the next release to avoid compatibility issues insert_quorum: Optional[int] = attr.ib(kw_only=True, default=None) diff --git a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/us_connection.py b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/us_connection.py index f036421f0..370cba4dd 100644 --- a/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/us_connection.py +++ b/lib/dl_connector_clickhouse/dl_connector_clickhouse/core/clickhouse_base/us_connection.py @@ -54,7 +54,7 @@ class DataModel(ClassicConnectionSQL.DataModel): cluster_name: Optional[str] = attr.ib(default=None) max_execution_time: Optional[int] = attr.ib(default=None) ssl_ca: Optional[str] = attr.ib(kw_only=True, default=None) - readonly: int = attr.ib(kw_only=True, default=None) + readonly: Optional[int] = attr.ib(kw_only=True, default=None) def get_conn_dto(self) -> ClickHouseConnDTO: return ClickHouseConnDTO(