Skip to content

Commit d807767

Browse files
committed
add bool | None to __exit__ return values
1 parent 67491fa commit d807767

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

stubs/cysqlite/cysqlite/_cysqlite.pyi

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class Atomic(_callable_context_manager):
6666
txn: Transaction | Savepoint
6767
def __init__(self, conn: Connection, lock: _IsolationLevel = None) -> None: ...
6868
def __enter__(self) -> Transaction | Savepoint: ...
69-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
69+
def __exit__(
70+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
71+
) -> bool | None: ...
7072
def __reduce__(self): ...
7173

7274
@disjoint_base
@@ -95,7 +97,9 @@ class Blob:
9597
def writelines(self, lines: Iterable[str | Buffer]) -> int: ...
9698
def __delitem__(self, other: int) -> None: ...
9799
def __enter__(self) -> Self: ...
98-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
100+
def __exit__(
101+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
102+
) -> bool | None: ...
99103
def __getitem__(self, key: int) -> bytes: ...
100104
def __iter__(self) -> Self: ...
101105
def __len__(self) -> int: ...
@@ -237,7 +241,9 @@ class Connection(_callable_context_manager):
237241
def unregister_converter(self, data_type: str) -> bool: ...
238242
def update_hook(self, fn: Callable[[_Query, str, str, int], Any] | None) -> None: ...
239243
def __enter__(self) -> Self: ...
240-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
244+
def __exit__(
245+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
246+
) -> bool | None: ...
241247
def __reduce__(self): ...
242248

243249
@final
@@ -259,7 +265,9 @@ class Cursor:
259265
def fetchone(self) -> tuple[Any, ...] | None: ...
260266
def scalar(self) -> Any | None: ...
261267
def __enter__(self) -> Self: ...
262-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
268+
def __exit__(
269+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
270+
) -> bool | None: ...
263271
def __iter__(self) -> Self: ...
264272
def __next__(self) -> Row | Any: ...
265273
def __reduce__(self): ...
@@ -291,7 +299,9 @@ class Savepoint(_callable_context_manager):
291299
def commit(self, begin: bool = True) -> None: ...
292300
def rollback(self) -> None: ...
293301
def __enter__(self) -> Self: ...
294-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
302+
def __exit__(
303+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
304+
) -> bool | None: ...
295305
def __reduce__(self): ...
296306

297307
class TableFunction:
@@ -317,7 +327,9 @@ class Transaction(_callable_context_manager):
317327
def commit(self, begin: bool = True) -> None: ...
318328
def rollback(self, begin: bool = True) -> None: ...
319329
def __enter__(self) -> Self: ...
320-
def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None): ...
330+
def __exit__(
331+
self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None
332+
) -> bool | None: ...
321333
def __reduce__(self): ...
322334

323335
class _callable_context_manager:

0 commit comments

Comments
 (0)