From 82b999995f91a1c6eabf63a5d69fd86ae5cc8835 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sat, 12 Mar 2022 11:59:25 +0100 Subject: [PATCH] Imports cleanup --- gui.py | 3 +-- inventory.py | 3 ++- twitch.py | 6 ++---- websocket.py | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gui.py b/gui.py index 4319f45..4cb7634 100644 --- a/gui.py +++ b/gui.py @@ -5,8 +5,8 @@ import logging import tkinter as tk from math import log10, ceil from tkinter.font import Font -from collections import namedtuple, OrderedDict from tkinter import Tk, ttk, StringVar, DoubleVar +from collections import abc, namedtuple, OrderedDict from typing import Any, TypedDict, NoReturn, TYPE_CHECKING try: @@ -20,7 +20,6 @@ from constants import FORMATTER, WS_TOPICS_LIMIT, MAX_WEBSOCKETS, WINDOW_TITLE, if TYPE_CHECKING: from twitch import Twitch from channel import Channel - from collections import abc from inventory import Game, TimedDrop diff --git a/inventory.py b/inventory.py index 4055a25..7ea5a18 100644 --- a/inventory.py +++ b/inventory.py @@ -9,8 +9,9 @@ from constants import GQL_OPERATIONS from utils import timestamp, invalidate_cache, Game if TYPE_CHECKING: - from twitch import Twitch from collections import abc + + from twitch import Twitch from constants import JsonType from gui import CampaignProgress diff --git a/twitch.py b/twitch.py index 4113a76..643c0ea 100644 --- a/twitch.py +++ b/twitch.py @@ -7,9 +7,9 @@ from yarl import URL from time import time from itertools import chain from functools import partial -from collections import OrderedDict -from typing import NoReturn, cast, TYPE_CHECKING +from collections import abc, OrderedDict from contextlib import suppress, asynccontextmanager +from typing import Final, NoReturn, cast, TYPE_CHECKING try: import aiohttp @@ -37,8 +37,6 @@ from constants import ( ) if TYPE_CHECKING: - from typing import Final - from collections import abc from datetime import datetime from utils import Game diff --git a/websocket.py b/websocket.py index 608a400..8eeb029 100644 --- a/websocket.py +++ b/websocket.py @@ -18,8 +18,9 @@ from utils import task_wrapper, create_nonce, AwaitableValue from constants import PING_INTERVAL, PING_TIMEOUT, MAX_WEBSOCKETS, WS_TOPICS_LIMIT if TYPE_CHECKING: - from twitch import Twitch from collections import abc + + from twitch import Twitch from constants import JsonType, WebsocketTopic