From bbd9a8e11ea5df83d50aa824227dede0f66fb404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayan=20S=C3=B3stenes?= <885388+rayansostenes@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:07:08 -0300 Subject: [PATCH] Update transaction.pyi --- django-stubs/db/transaction.pyi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/django-stubs/db/transaction.pyi b/django-stubs/db/transaction.pyi index 3706553aa..1d7adb72f 100644 --- a/django-stubs/db/transaction.pyi +++ b/django-stubs/db/transaction.pyi @@ -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): ... @@ -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: ...