Skip to content

Commit

Permalink
Update transaction.pyi
Browse files Browse the repository at this point in the history
  • Loading branch information
rayansostenes authored Sep 25, 2024
1 parent 7f9bd0d commit bbd9a8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions django-stubs/db/transaction.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ from collections.abc import Callable, Iterator
from contextlib import contextmanager
from typing import Any, TypeVar, overload

from types import TracebackType
from django.db import ProgrammingError

class TransactionManagementError(ProgrammingError): ...
Expand Down Expand Up @@ -35,8 +36,12 @@ class Atomic:
# When decorating, return the decorated function as-is, rather than clobbering it as ContextDecorator does.
def __call__(self, func: _C) -> _C: ...
def __enter__(self) -> None: ...
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...

def __exit__(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: TracebackType | None, /
) -> None: ...
# Bare decorator
@overload
def atomic(using: _C) -> _C: ...
Expand Down

0 comments on commit bbd9a8e

Please sign in to comment.