Skip to content

Commit

Permalink
Improve type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jond01 committed Sep 11, 2024
1 parent 81d2fb0 commit 1149e63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storey/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ def _get_tdengine_type_to_tag_func() -> dict[str, Callable[[Any], "taosws.PyTagV
"VARCHAR": taosws.varchar_to_tag,
}

def _init(self):
def _init(self) -> None:
import taosws

_Batching._init(self)
Expand All @@ -936,7 +936,7 @@ def _get_params_template(num_param: int) -> str:
return f"({','.join(num_param * ['?'])})"

def _get_table_schema(
self, table_name
self, table_name: str
) -> tuple[
list[tuple[str, Callable[[Any], "taosws.PyTagView"]]], list[tuple[str, Callable[[list], "taosws.PyColumnView"]]]
]:
Expand Down Expand Up @@ -980,7 +980,7 @@ def _raw_value_to_value(value):
@classmethod
def _get_batch_values(
cls, reg_cols_schema: list[tuple[str, Callable[[list], "taosws.PyColumnView"]]], batch: list[dict]
) -> list:
) -> list["taosws.PyColumnView"]:
return [
col_func([cls._raw_value_to_value(event.get(col_name)) for event in batch])
for col_name, col_func in reg_cols_schema
Expand Down

0 comments on commit 1149e63

Please sign in to comment.