mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 09:54:56 -04:00
Add missing type hints to synapse.logging.context
(#11556)
This commit is contained in:
parent
2519beaad2
commit
0147b3de20
13 changed files with 215 additions and 122 deletions
|
@ -17,11 +17,12 @@
|
|||
from typing import Any, List, Optional, Type, Union
|
||||
|
||||
from twisted.internet import protocol
|
||||
from twisted.internet.defer import Deferred
|
||||
|
||||
class RedisProtocol(protocol.Protocol):
|
||||
def publish(self, channel: str, message: bytes): ...
|
||||
async def ping(self) -> None: ...
|
||||
async def set(
|
||||
def ping(self) -> "Deferred[None]": ...
|
||||
def set(
|
||||
self,
|
||||
key: str,
|
||||
value: Any,
|
||||
|
@ -29,8 +30,8 @@ class RedisProtocol(protocol.Protocol):
|
|||
pexpire: Optional[int] = None,
|
||||
only_if_not_exists: bool = False,
|
||||
only_if_exists: bool = False,
|
||||
) -> None: ...
|
||||
async def get(self, key: str) -> Any: ...
|
||||
) -> "Deferred[None]": ...
|
||||
def get(self, key: str) -> "Deferred[Any]": ...
|
||||
|
||||
class SubscriberProtocol(RedisProtocol):
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue