cleanup: Remove unused imports.

Generated by autoflake.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-18 16:00:35 -07:00 committed by Tim Abbott
parent 64d2f5ac32
commit 2f6623bbc4
61 changed files with 25 additions and 91 deletions

View file

@ -2,8 +2,6 @@
import os
import sys
import glob
import subprocess
from typing import Any, Dict, Optional
ZULIP_BOTS_VERSION = "0.6.4"

View file

@ -1,8 +1,7 @@
import requests
import logging
import json
from typing import Dict, Any, List
from requests.exceptions import HTTPError, ConnectionError
from typing import Any, Dict
from requests.exceptions import ConnectionError
help_message = '''
You can add datapoints towards your beeminder goals \

View file

@ -1,4 +1,4 @@
from unittest.mock import patch, Mock
from unittest.mock import patch
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler
from requests.exceptions import ConnectionError

View file

@ -1,5 +1,4 @@
from copy import deepcopy
from random import randint
from functools import reduce
from zulip_bots.game_handler import BadMoveException

View file

@ -1,10 +1,8 @@
# See readme.md for instructions on running this code.
import copy
import importlib
from math import log10, floor
import re
from zulip_bots.bots.converter import utils
from typing import Any, Dict, List

View file

@ -1,6 +1,5 @@
# See readme.md for instructions on running this code.
import logging
import json
import requests
import html2text
import string

View file

@ -1,11 +1,10 @@
# See readme.md for instructions on running this code.
import logging
from urllib import parse
import json
import apiai
from typing import Dict, Any, List
from typing import Any, Dict
help_message = '''DialogFlow bot
This bot will interact with dialogflow bots.

View file

@ -1,4 +1,4 @@
from unittest.mock import patch, MagicMock, Mock
from unittest.mock import Mock, patch
from zulip_bots.test_lib import (
get_bot_message_handler,

View file

@ -1,6 +1,6 @@
import requests
import re
from typing import Any, Dict, Optional
from typing import Any, Dict
class FrontHandler:
FRONT_API = "https://api2.frontapp.com/conversations/{}"

View file

@ -1,5 +1,4 @@
import copy
import random
from typing import List, Any, Tuple, Dict
from zulip_bots.game_handler import GameAdapter, BadMoveException

View file

@ -1,5 +1,5 @@
from unittest.mock import patch
from requests.exceptions import HTTPError, ConnectionError
from requests.exceptions import ConnectionError
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler

View file

@ -1,8 +1,5 @@
import re
import os
import sys
import logging
import configparser
import requests

View file

@ -1,12 +1,11 @@
# See readme.md for instructions on running this code.
import logging
from urllib import parse
import requests
from bs4 import BeautifulSoup
from typing import Dict, Any, Union, List
from typing import Any, Dict, List
def google_search(keywords: str) -> List[Dict[str, str]]:
query = {'q': keywords}

View file

@ -2,7 +2,6 @@
# googletranslate.conf in this (zulip_bots/bots/googletranslate/) directory.
import requests
from requests.exceptions import HTTPError, ConnectionError
class GoogleTranslateHandler:
'''

View file

@ -2,7 +2,6 @@ from unittest.mock import patch
from requests.exceptions import ConnectionError
from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler
from zulip_bots.bots.google_translate.google_translate import TranslateError
help_text = '''
Google translate bot

View file

@ -19,7 +19,6 @@ class TeamNotFoundException(Exception):
class UnknownCommandSyntax(Exception):
def __init__(self, detail: str) -> None:
self.detail = detail
pass
class UnspecifiedProblemException(Exception):
pass

View file

@ -1,10 +1,8 @@
import html
import json
import random
import re
from zulip_bots.lib import Any
from typing import Optional, Any, Dict, Tuple
from typing import Any, Dict, Tuple
QUESTION = 'How should we handle this?'

View file

@ -1,7 +1,7 @@
import base64
import re
import requests
from typing import Any, Dict, Iterable, Optional
from typing import Any, Dict, Optional
GET_REGEX = re.compile('get "(?P<issue_key>.+)"$')
CREATE_REGEX = re.compile(

View file

@ -1,6 +1,5 @@
import re
import requests
import logging
from typing import Any, Dict

View file

@ -2,7 +2,6 @@
import requests
from typing import Any, List, Dict
import logging
class MentionHandler:
def initialize(self, bot_handler: Any) -> None:

View file

@ -10,8 +10,6 @@ finished yet so any matches that are finished will be removed.
import json
from .constants import EMPTY_BOARD
class MerelsStorage():
def __init__(self, topic_name, storage):

View file

@ -5,7 +5,7 @@ from zulip_bots.bots.merels.libraries import (
database,
game_data
)
from zulip_bots.game_handler import GameAdapter, SamePlayerMove, GameInstance
from zulip_bots.game_handler import GameAdapter, SamePlayerMove
class Storage:
data = {}

View file

@ -1,11 +1,8 @@
import unittest
from libraries import database
from libraries import game_data
from zulip_bots.simple_lib import SimpleStorage
from zulip_bots.test_lib import BotTestCase, DefaultTests
from zulip_bots.game_handler import GameInstance
from merels import MerelsHandler
class DatabaseTest(BotTestCase, DefaultTests):
bot_name = 'merels'

View file

@ -2,10 +2,8 @@
import simple_salesforce
from typing import Dict, Any, List
import getpass
import re
import logging
import json
from zulip_bots.bots.salesforce.utils import commands, object_types, link_query, default_query
base_help_text = '''Salesforce bot

View file

@ -1,7 +1,5 @@
import requests
import logging
import re
import urllib
from typing import Optional, Any, Dict

View file

@ -1,5 +1,5 @@
import requests
from typing import Dict, Any, Tuple, Union
from typing import Any, Dict
class SusiHandler:
'''

View file

@ -8,7 +8,6 @@ from zulip_bots.test_file_utils import (
read_bot_fixture_data,
)
from unittest.mock import patch
import tweepy
class TestTwitpostBot(BotTestCase, DefaultTests):
bot_name = "twitpost"

View file

@ -1,6 +1,5 @@
import zulip
import tweepy
from typing import Dict, Any, Union, List, Tuple, Optional
from typing import Any, Dict
class TwitpostBot:

View file

@ -3,7 +3,7 @@
import re
import os
from typing import Any, Dict, List, Tuple, Callable, Set, Union
from typing import Any, Dict, List, Set, Tuple, Union
class VirtualFsHandler:
META = {

View file

@ -1,7 +1,5 @@
# See readme.md for instructions on running this code.
import requests
import json
import logging
from typing import Any, Dict

View file

@ -1,7 +1,5 @@
import requests
import logging
import re
import urllib
from zulip_bots.lib import Any
from typing import Optional, Any, Dict

View file

@ -2,7 +2,6 @@
from typing import Dict, Any, Optional, Callable
import wit
import sys
import importlib.util
class WitaiHandler:

View file

@ -1,7 +1,6 @@
# See readme.md for instructions on running this code.
import logging
import ssl
import sys
import requests
from typing import Any, Dict

View file

@ -1,6 +1,5 @@
import requests
import logging
import sys
from requests.exceptions import HTTPError, ConnectionError
from typing import Dict, Any, Union, List, Tuple, Optional

View file

@ -4,8 +4,6 @@ import random
import logging
from copy import deepcopy
from typing import Any, Dict, Tuple, List
from zulip_bots.test_lib import BotTestCase
import operator
import random

View file

@ -11,7 +11,6 @@ import re
from typing import Any, Optional, List, Dict, IO, Text
from zulip import Client, ZulipError
from zulip_bots.custom_exceptions import ConfigValidationError
class NoBotConfigException(Exception):

View file

@ -6,7 +6,6 @@ import os
import sys
import subprocess
import glob
import pip
from typing import Iterator
def get_bot_paths() -> Iterator[str]:

View file

@ -4,7 +4,6 @@ import logging
import argparse
import sys
import os
from os.path import basename, splitext
from zulip_bots.lib import (
zulip_env_vars_are_present,