From b8e52bd2b919ea328817964bd580dd1a7c8a75d2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 7 May 2020 00:31:40 +0200 Subject: [PATCH] Clean up serfs code --- royalnet/serf/discord/discordserf.py | 16 +--------------- royalnet/serf/matrix/matrixserf.py | 8 +------- royalnet/serf/telegram/telegramserf.py | 11 +++-------- royalnet/version.py | 2 +- 4 files changed, 6 insertions(+), 31 deletions(-) diff --git a/royalnet/serf/discord/discordserf.py b/royalnet/serf/discord/discordserf.py index d548a3a7..451d2209 100644 --- a/royalnet/serf/discord/discordserf.py +++ b/royalnet/serf/discord/discordserf.py @@ -8,23 +8,9 @@ from royalnet.utils import asyncify from royalnet.serf import Serf from .escape import escape from .voiceplayer import VoicePlayer +import discord -try: - import discord -except ImportError: - discord = None - -try: - from sqlalchemy.orm.session import Session -except ImportError: - Session = None - -try: - from royalnet.herald import Config as HeraldConfig -except ImportError: - HeraldConfig = None - log = logging.getLogger(__name__) diff --git a/royalnet/serf/matrix/matrixserf.py b/royalnet/serf/matrix/matrixserf.py index a0a8994a..eaa59b27 100644 --- a/royalnet/serf/matrix/matrixserf.py +++ b/royalnet/serf/matrix/matrixserf.py @@ -7,13 +7,7 @@ import royalnet.commands as rc import royalnet.utils as ru from ..serf import Serf from .escape import escape - - -try: - import nio -except ImportError: - nio = None - +import nio log = logging.getLogger(__name__) diff --git a/royalnet/serf/telegram/telegramserf.py b/royalnet/serf/telegram/telegramserf.py index a76d0843..8fc07298 100644 --- a/royalnet/serf/telegram/telegramserf.py +++ b/royalnet/serf/telegram/telegramserf.py @@ -9,14 +9,9 @@ import royalnet.backpack as rb from .escape import escape from ..serf import Serf -try: - import telegram - import urllib3 - from telegram.utils.request import Request as TRequest -except ImportError: - telegram = None - urllib3 = None - TRequest = None +import telegram +import urllib3 +from telegram.utils.request import Request as TRequest try: from sqlalchemy.orm.session import Session diff --git a/royalnet/version.py b/royalnet/version.py index 03998cec..3d6bddf3 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.8.0" +semantic = "5.8.1"