Skip to content

Commit 6200a4b

Browse files
chore: hoist missed lazy import in RowsResponse.decode_body
Issue 076 moved all lazy imports to top-level but missed one inside the zero-column branch of RowsResponse.decode_body: ROW_DONE_BYTE, ROW_PART_BYTE, and WORD_SIZE from dqlitewire.constants. Add them to the top-level import block and remove the lazy import. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f031997 commit 6200a4b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/dqlitewire/messages/responses.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
from typing import Any, ClassVar
55

66
from dqlitewire.constants import (
7+
ROW_DONE_BYTE,
78
ROW_DONE_MARKER,
9+
ROW_PART_BYTE,
810
ROW_PART_MARKER,
11+
WORD_SIZE,
912
ResponseType,
1013
ValueType,
1114
)
@@ -317,8 +320,6 @@ def decode_body(
317320
# Zero-column results cannot have row data (each row would be zero
318321
# bytes), so skip the row loop and consume the end marker directly.
319322
if column_count == 0:
320-
from dqlitewire.constants import ROW_DONE_BYTE, ROW_PART_BYTE, WORD_SIZE
321-
322323
if offset + WORD_SIZE > len(data):
323324
raise DecodeError(
324325
"RowsResponse body exhausted without end marker (zero-column result)"

0 commit comments

Comments
 (0)