Skip to content

Commit 76a84c8

Browse files
Cycle 12: lift 'import math' to module level (sync + aio)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 33c3f53 commit 76a84c8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/dqlitedbapi/aio/connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import asyncio
44
import contextlib
5+
import math
56
from typing import Any
67

78
from dqliteclient import DqliteConnection
@@ -30,8 +31,6 @@ def __init__(
3031
frames. Forwarded to the underlying DqliteConnection;
3132
``None`` disables the cap.
3233
"""
33-
import math
34-
3534
if not math.isfinite(timeout) or timeout <= 0:
3635
raise ValueError(f"timeout must be a positive finite number, got {timeout}")
3736
self._address = address

src/dqlitedbapi/connection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import asyncio
44
import contextlib
5+
import math
56
import threading
67
import warnings
78
import weakref
@@ -75,8 +76,6 @@ def __init__(
7576
frames for a single query. Forwarded to the underlying
7677
:class:`DqliteConnection`. ``None`` disables the cap.
7778
"""
78-
import math
79-
8079
if not math.isfinite(timeout) or timeout <= 0:
8180
raise ValueError(f"timeout must be a positive finite number, got {timeout}")
8281
self._address = address

0 commit comments

Comments
 (0)