X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=smart_future.py;h=f11be17bc0fabfeb4a111e4b3356bbcb1ed1633a;hb=3f4818bf9d1f3071c4e2906896d422810b5776bc;hp=7dbec5004b4ba927331e71fb812fd482af678c3c;hpb=b10d30a46e601c9ee1f843241f2d69a1f90f7a94;p=python_utils.git diff --git a/smart_future.py b/smart_future.py index 7dbec50..f11be17 100644 --- a/smart_future.py +++ b/smart_future.py @@ -6,6 +6,8 @@ import concurrent.futures as fut import time from typing import Callable, List, TypeVar +from overrides import overrides + # This module is commonly used by others in here and should avoid # taking any unnecessary dependencies back on them. from deferred_operand import DeferredOperand @@ -66,5 +68,6 @@ class SmartFuture(DeferredOperand): # You shouldn't have to call this; instead, have a look at defining a # method on DeferredOperand base class. + @overrides def _resolve(self, *, timeout=None) -> T: return self.wrapped_future.result(timeout)