Skip to content

Commit

Permalink
Remove mypy workaround after 0.800 update
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jan 25, 2021
1 parent 6806091 commit dfe933c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/_pytest/threadexception.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ class catch_threading_exception:
"""

def __init__(self) -> None:
# See https://github.com/python/typeshed/issues/4767 regarding the underscore.
self.args: Optional["threading._ExceptHookArgs"] = None
self._old_hook: Optional[Callable[["threading._ExceptHookArgs"], Any]] = None
self.args: Optional["threading.ExceptHookArgs"] = None
self._old_hook: Optional[Callable[["threading.ExceptHookArgs"], Any]] = None

def _hook(self, args: "threading._ExceptHookArgs") -> None:
def _hook(self, args: "threading.ExceptHookArgs") -> None:
self.args = args

def __enter__(self) -> "catch_threading_exception":
Expand Down

0 comments on commit dfe933c

Please sign in to comment.