test_stripe: Add CallableT cast.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-11-10 13:14:39 -08:00
parent 2a8a59f548
commit f294688157
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ def mock_stripe(tested_timestamp_fields: Sequence[str]=[],
decorated_function.__name__, mocked_function_name, mocked_function) # nocoverage decorated_function.__name__, mocked_function_name, mocked_function) # nocoverage
else: else:
side_effect = read_stripe_fixture(decorated_function.__name__, mocked_function_name) 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) @wraps(decorated_function)
def wrapped(*args: object, **kwargs: object) -> object: def wrapped(*args: object, **kwargs: object) -> object: