From f29468815757398618cf4dc0b1ed596ccf27f00f Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 10 Nov 2020 13:14:39 -0800 Subject: [PATCH] test_stripe: Add CallableT cast. Signed-off-by: Anders Kaseorg --- corporate/tests/test_stripe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index 4bfaa0ac87..bc83a4c2fc 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -224,7 +224,7 @@ def mock_stripe(tested_timestamp_fields: Sequence[str]=[], decorated_function.__name__, mocked_function_name, mocked_function) # nocoverage else: side_effect = read_stripe_fixture(decorated_function.__name__, mocked_function_name) - decorated_function = patch(mocked_function_name, side_effect=side_effect)(decorated_function) + decorated_function = cast(CallableT, patch(mocked_function_name, side_effect=side_effect)(decorated_function)) @wraps(decorated_function) def wrapped(*args: object, **kwargs: object) -> object: