Skip to content

Commit

Permalink
Annotate __init__ methods consistently.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Aug 3, 2024
1 parent 309e62f commit fab77d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/websockets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(
state: State = CONNECTING,
max_size: int | None = 2**20,
logger: LoggerLike | None = None,
):
) -> None:
super().__init__(
side=CLIENT,
state=state,
Expand Down
2 changes: 1 addition & 1 deletion src/websockets/legacy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ class WebSocketServer:
"""

def __init__(self, logger: LoggerLike | None = None):
def __init__(self, logger: LoggerLike | None = None) -> None:
if logger is None:
logger = logging.getLogger("websockets.server")
self.logger = logger
Expand Down
2 changes: 1 addition & 1 deletion src/websockets/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
state: State = CONNECTING,
max_size: int | None = 2**20,
logger: LoggerLike | None = None,
):
) -> None:
super().__init__(
side=SERVER,
state=state,
Expand Down
2 changes: 1 addition & 1 deletion src/websockets/sync/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __init__(
socket: socket.socket,
handler: Callable[[socket.socket, Any], None],
logger: LoggerLike | None = None,
):
) -> None:
self.socket = socket
self.handler = handler
if logger is None:
Expand Down

0 comments on commit fab77d6

Please sign in to comment.