type-hint HomeserverTestcase.setup_test_homeserver (#10961)

* type-hint `HomeserverTestcase.setup_test_homeserver`

For better IDE completion. A small drive-by.
This commit is contained in:
David Robertson 2021-10-01 12:22:47 +01:00 committed by GitHub
parent 7e440520c9
commit e46ac85d67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 9 deletions

View file

@ -20,7 +20,7 @@ import inspect
import logging
import secrets
import time
from typing import Callable, Dict, Iterable, Optional, Tuple, Type, TypeVar, Union
from typing import Any, Callable, Dict, Iterable, Optional, Tuple, Type, TypeVar, Union
from unittest.mock import Mock, patch
from canonicaljson import json
@ -449,7 +449,7 @@ class HomeserverTestCase(TestCase):
client_ip,
)
def setup_test_homeserver(self, *args, **kwargs):
def setup_test_homeserver(self, *args: Any, **kwargs: Any) -> HomeServer:
"""
Set up the test homeserver, meant to be called by the overridable
make_homeserver. It automatically passes through the test class's