Skip to content

Commit 3a11770

Browse files
committed
ruff check --fix --unsafe-fixes
1 parent 7b45202 commit 3a11770

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

tdclient/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING, Any, Callable
5+
from collections.abc import Callable
6+
from typing import TYPE_CHECKING, Any
67

78
from tdclient import api, cursor, errors
89
from tdclient.types import Priority

tdclient/cursor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from __future__ import annotations
44

55
import time
6-
from typing import TYPE_CHECKING, Any, Callable
6+
from collections.abc import Callable
7+
from typing import TYPE_CHECKING, Any
78

89
from tdclient import errors
910

tdclient/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from __future__ import annotations
44

55
from array import array
6-
from typing import IO, TYPE_CHECKING
6+
from typing import IO, TYPE_CHECKING, Literal, TypeAlias
77

8-
from typing_extensions import Literal, TypeAlias, TypedDict
8+
from typing_extensions import TypedDict
99

1010
if TYPE_CHECKING:
1111
from collections.abc import Callable

tdclient/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def csv_text_record_reader(
233233
"""
234234
reader = csv.reader(io.TextIOWrapper(file_like, encoding), dialect=dialect)
235235
for row in reader:
236-
yield dict(zip(columns, row))
236+
yield dict(zip(columns, row, strict=False))
237237

238238

239239
def read_csv_records(
@@ -300,7 +300,7 @@ def normalized_msgpack(value: Any) -> Any:
300300
Returns:
301301
Normalized value
302302
"""
303-
if isinstance(value, (list, tuple)):
303+
if isinstance(value, list | tuple):
304304
return [normalized_msgpack(v) for v in value]
305305
elif isinstance(value, dict):
306306
return dict(

0 commit comments

Comments
 (0)