Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7be1e59

Browse files
mf2199MaxxleLLCcrwilcox
authored
feat: [CBT-6 helper] Exposing Retry._deadline as a property (#20)
* Retry._deadline exposed as a property* feat Retry._deadline exposed as a property* added property testCo-authored-by: q-logic <52290913+q-logic@users.noreply.github.com>Co-authored-by: Christopher Wilcox <crwilcox@google.com>
1 parente4eaec0 commit7be1e59

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎google/api_core/retry.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ def retry_wrapped_func(*args, **kwargs):
288288

289289
returnretry_wrapped_func
290290

291+
@property
292+
defdeadline(self):
293+
returnself._deadline
294+
291295
defwith_deadline(self,deadline):
292296
"""Return a copy of this retry with the given deadline.
293297

‎tests/unit/test_retry.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def test_constructor_defaults(self):
162162
assertretry_._multiplier==2
163163
assertretry_._deadline==120
164164
assertretry_._on_errorisNone
165+
assertretry_.deadline==120
165166

166167
deftest_constructor_options(self):
167168
_some_function=mock.Mock()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp