mirror of https://github.com/zulip/zulip.git
ruff: Fix ANN204 missing return type annotation for __init__.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
3442bf2843
commit
46955da3a0
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue