Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pomponchik committed Mar 31, 2024
1 parent 8a2f150 commit 7f0c6b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locklib/locks/smart_lock/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from threading import Lock, get_ident as get_native_id # get_native_id is available only since python 3.8

from collections import deque
from typing import Type, Deque, Dict
from typing import Type, Deque, Dict, Optional
from types import TracebackType

from locklib.locks.smart_lock.graph import LocksGraph
Expand Down Expand Up @@ -61,5 +61,5 @@ def release(self) -> None:
def __enter__(self) -> None:
self.acquire()

def __exit__(self, exception_type: Type[BaseException], exception_value: BaseException, traceback: TracebackType) -> None:
def __exit__(self, exception_type: Optional[Type[BaseException]], exception_value: Optional[BaseException], traceback: Optional[TracebackType]) -> None:
self.release()

0 comments on commit 7f0c6b0

Please sign in to comment.