ruff: Fix ANN204 missing return type annotation for __init__.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-11-15 21:10:54 -08:00 committed by Tim Abbott
parent 3442bf2843
commit 46955da3a0
4 changed files with 5 additions and 5 deletions

View File

@ -622,7 +622,7 @@ class StripeTestCase(ZulipTestCase):
free_trial: bool,
) -> None:
class StripeMock(Mock):
def __init__(self, depth: int = 1):
def __init__(self, depth: int = 1) -> None:
super().__init__(spec=stripe.Card)
self.id = "id"
self.created = "1000"

View File

@ -748,7 +748,7 @@ def flush_submessage(*, instance: "SubMessage", **kwargs: object) -> None:
class IgnoreUnhashableLruCacheWrapper(Generic[ParamT, ReturnT]):
def __init__(
self, function: Callable[ParamT, ReturnT], cached_function: "_lru_cache_wrapper[ReturnT]"
):
) -> None:
self.key_prefix = KEY_PREFIX
self.function = function
self.cached_function = cached_function

View File

@ -386,7 +386,7 @@ class ResultWithFamily(Generic[T]):
family: ElementFamily
result: T
def __init__(self, family: ElementFamily, result: T):
def __init__(self, family: ElementFamily, result: T) -> None:
self.family = family
self.result = result
@ -395,7 +395,7 @@ class ElementPair:
parent: Optional["ElementPair"]
value: Element
def __init__(self, parent: Optional["ElementPair"], value: Element):
def __init__(self, parent: Optional["ElementPair"], value: Element) -> None:
self.parent = parent
self.value = value

View File

@ -68,7 +68,7 @@ def migration_paths() -> List[str]:
class Database:
def __init__(self, platform: str, database_name: str, settings: str):
def __init__(self, platform: str, database_name: str, settings: str) -> None:
self.database_name = database_name
self.settings = settings
self.digest_name = "db_files_hash_for_" + platform