diff --git a/setup.cfg b/setup.cfg index 47acf312c..48703df87 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,4 +35,5 @@ exclude_lines = if self.debug: pragma: no cover raise AssertionError + raise NotImplementedError self.fail\(".*"\) diff --git a/src/websockets/extensions/base.py b/src/websockets/extensions/base.py index 060967618..6c481a46c 100644 --- a/src/websockets/extensions/base.py +++ b/src/websockets/extensions/base.py @@ -38,6 +38,7 @@ def decode( PayloadTooBig: if decoding the payload exceeds ``max_size``. """ + raise NotImplementedError def encode(self, frame: frames.Frame) -> frames.Frame: """ @@ -50,6 +51,7 @@ def encode(self, frame: frames.Frame) -> frames.Frame: Frame: Encoded frame. """ + raise NotImplementedError class ClientExtensionFactory: @@ -69,6 +71,7 @@ def get_request_params(self) -> List[ExtensionParameter]: List[ExtensionParameter]: Parameters to send to the server. """ + raise NotImplementedError def process_response_params( self, @@ -91,6 +94,7 @@ def process_response_params( NegotiationError: if parameters aren't acceptable. """ + raise NotImplementedError class ServerExtensionFactory: @@ -126,3 +130,4 @@ def process_request_params( the client aren't acceptable. """ + raise NotImplementedError diff --git a/src/websockets/legacy/protocol.py b/src/websockets/legacy/protocol.py index 1b6e58efa..21784eb55 100644 --- a/src/websockets/legacy/protocol.py +++ b/src/websockets/legacy/protocol.py @@ -220,8 +220,6 @@ def __init__( # Logger or LoggerAdapter for this connection. if logger is None: logger = logging.getLogger("websockets.protocol") - # https://github.com/python/typeshed/issues/5561 - logger = cast(logging.Logger, logger) self.logger: LoggerLike = logging.LoggerAdapter(logger, {"websocket": self}) """Logger for this connection."""