From 6df65c0f3e599566098712f160680b2e6b099acd Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 28 Jan 2019 23:36:45 +0100 Subject: [PATCH] Fix db.py imports --- db.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db.py b/db.py index 94a92795..f27ebf00 100644 --- a/db.py +++ b/db.py @@ -1,7 +1,6 @@ import datetime import logging import os -import typing import coloredlogs from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship @@ -14,17 +13,18 @@ import errors from errors import NotFoundError, AlreadyExistingError, PrivateError import re import enum -# Both packages have different pip names -# noinspection PyPackageRequirements -# from discord import User as DiscordUser -# noinspection PyPackageRequirements -from telegram import User as TelegramUser import loldata from dirty import Dirty, DirtyDelta import sql_queries from flask import escape import libgravatar import configparser +import typing +if typing.TYPE_CHECKING: + # noinspection PyPackageRequirements + from discord import User as DiscordUser + # noinspection PyPackageRequirements + from telegram import User as TelegramUser # Init the config reader config = configparser.ConfigParser()