Skip to content

Commit f9754e9

Browse files
Lift ProgrammingError import + prune aio.cursor __all__
Cycle 7 cleanups: - AsyncCursor.arraysize.setter imported ProgrammingError inside the function body on every call. Moved to module-level imports to match the sync Cursor and avoid repeated runtime import work. - _strip_leading_comments was leaked into aio.cursor's __all__ when ISSUE-13 consolidated the helper. It's a private utility; dropped from __all__ so IDE/grep don't surface it as public API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ecb718b commit f9754e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/dqlitedbapi/aio/cursor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
_convert_row,
1010
_strip_leading_comments,
1111
)
12-
from dqlitedbapi.exceptions import InterfaceError
12+
from dqlitedbapi.exceptions import InterfaceError, ProgrammingError
1313

1414
if TYPE_CHECKING:
1515
from dqlitedbapi.aio.connection import AsyncConnection
1616

1717

18-
__all__ = ["AsyncCursor", "_strip_leading_comments"]
18+
__all__ = ["AsyncCursor"]
1919

2020

2121
class AsyncCursor:
@@ -62,8 +62,6 @@ def arraysize(self) -> int:
6262
@arraysize.setter
6363
def arraysize(self, value: int) -> None:
6464
if value < 1:
65-
from dqlitedbapi.exceptions import ProgrammingError
66-
6765
raise ProgrammingError(f"arraysize must be >= 1, got {value}")
6866
self._arraysize = value
6967

0 commit comments

Comments
 (0)