Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Improve a type hint while I'm here
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jan 5, 2022
1 parent 9953d6c commit 0999ed8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import warnings
from asyncio import Future
from binascii import unhexlify
from typing import Any, Awaitable, Callable, TypeVar
from typing import Awaitable, Callable, TypeVar
from unittest.mock import Mock

import attr
Expand All @@ -46,7 +46,7 @@ def get_awaitable_result(awaitable: Awaitable[TV]) -> TV:
raise Exception("awaitable has not yet completed")


def make_awaitable(result: Any) -> Awaitable[Any]:
def make_awaitable(result: TV) -> Awaitable[TV]:
"""
Makes an awaitable, suitable for mocking an `async` function.
This uses Futures as they can be awaited multiple times so can be returned
Expand Down

0 comments on commit 0999ed8

Please sign in to comment.