Skip to content

Commit

Permalink
Merge pull request #10213 from domdfcoding/tenacity-noreturn
Browse files Browse the repository at this point in the history
Patch tenacity to quote typing.NoReturn
  • Loading branch information
uranusjr authored Jul 26, 2021
2 parents 867bbb0 + 20629e4 commit a53f888
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pip/_vendor/tenacity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __init__(self, last_attempt: "Future") -> None:
self.last_attempt = last_attempt
super().__init__(last_attempt)

def reraise(self) -> t.NoReturn:
def reraise(self) -> "t.NoReturn":
if self.last_attempt.failed:
raise self.last_attempt.result()
raise self
Expand Down
15 changes: 14 additions & 1 deletion tools/vendoring/patches/tenacity.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py
index 88c28d2d6..f984eec4e 100644
index 88c28d2d6..086ad46e1 100644
--- a/src/pip/_vendor/tenacity/__init__.py
+++ b/src/pip/_vendor/tenacity/__init__.py
@@ -76,10 +76,12 @@ from .after import after_nothing # noqa
Expand All @@ -19,3 +19,16 @@ index 88c28d2d6..f984eec4e 100644

if t.TYPE_CHECKING:
import types

--- a/src/pip/_vendor/tenacity/__init__.py
+++ b/src/pip/_vendor/tenacity/__init__.py
@@ -190,7 +190,7 @@ class RetryError(Exception):
self.last_attempt = last_attempt
super().__init__(last_attempt)

- def reraise(self) -> t.NoReturn:
+ def reraise(self) -> "t.NoReturn":
if self.last_attempt.failed:
raise self.last_attempt.result()
raise self

0 comments on commit a53f888

Please sign in to comment.