From c3e407ef53a444f01453e8782e421a45c178d23d Mon Sep 17 00:00:00 2001 From: MtkN1 <51289448+MtkN1@users.noreply.github.com> Date: Sat, 24 Feb 2024 03:27:29 +0000 Subject: [PATCH] Fix minor linting errors --- src/wsproto/__init__.py | 1 + src/wsproto/events.py | 2 +- src/wsproto/handshake.py | 1 + src/wsproto/utilities.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wsproto/__init__.py b/src/wsproto/__init__.py index f39ae4b..60d04f2 100644 --- a/src/wsproto/__init__.py +++ b/src/wsproto/__init__.py @@ -4,6 +4,7 @@ A WebSocket implementation. """ + from typing import Generator, Optional, Union from .connection import Connection, ConnectionState, ConnectionType diff --git a/src/wsproto/events.py b/src/wsproto/events.py index d758f8a..7863c42 100644 --- a/src/wsproto/events.py +++ b/src/wsproto/events.py @@ -4,6 +4,7 @@ Events that result from processing data on a WebSocket connection. """ + from abc import ABC from dataclasses import dataclass, field from typing import Generic, List, Optional, Sequence, TypeVar, Union @@ -156,7 +157,6 @@ class RejectData(Event): @dataclass(frozen=True) class CloseConnection(Event): - """The end of a Websocket connection, represents a closure frame. **wsproto does not automatically send a response to a close event.** To diff --git a/src/wsproto/handshake.py b/src/wsproto/handshake.py index 4ca8c60..72af722 100644 --- a/src/wsproto/handshake.py +++ b/src/wsproto/handshake.py @@ -4,6 +4,7 @@ An implementation of WebSocket handshakes. """ + from collections import deque from typing import ( cast, diff --git a/src/wsproto/utilities.py b/src/wsproto/utilities.py index 7cf53d1..967d94f 100644 --- a/src/wsproto/utilities.py +++ b/src/wsproto/utilities.py @@ -4,6 +4,7 @@ Utility functions that do not belong in a separate module. """ + import base64 import hashlib import os