mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 11:24:59 -04:00
Add more missing type hints to tests. (#15028)
This commit is contained in:
parent
4eed7b2ede
commit
30509a1010
14 changed files with 124 additions and 111 deletions
|
@ -12,7 +12,7 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
from typing import List, Optional, Tuple
|
||||
from typing import Any, List, Optional, Tuple
|
||||
|
||||
import synapse.server
|
||||
from synapse.api.constants import EventTypes
|
||||
|
@ -32,7 +32,7 @@ async def inject_member_event(
|
|||
membership: str,
|
||||
target: Optional[str] = None,
|
||||
extra_content: Optional[dict] = None,
|
||||
**kwargs,
|
||||
**kwargs: Any,
|
||||
) -> EventBase:
|
||||
"""Inject a membership event into a room."""
|
||||
if target is None:
|
||||
|
@ -57,7 +57,7 @@ async def inject_event(
|
|||
hs: synapse.server.HomeServer,
|
||||
room_version: Optional[str] = None,
|
||||
prev_event_ids: Optional[List[str]] = None,
|
||||
**kwargs,
|
||||
**kwargs: Any,
|
||||
) -> EventBase:
|
||||
"""Inject a generic event into a room
|
||||
|
||||
|
@ -82,7 +82,7 @@ async def create_event(
|
|||
hs: synapse.server.HomeServer,
|
||||
room_version: Optional[str] = None,
|
||||
prev_event_ids: Optional[List[str]] = None,
|
||||
**kwargs,
|
||||
**kwargs: Any,
|
||||
) -> Tuple[EventBase, EventContext]:
|
||||
if room_version is None:
|
||||
room_version = await hs.get_datastores().main.get_room_version_id(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue