aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcogs/general.py2
-rwxr-xr-xcogs/trans.py2
-rwxr-xr-xcogs/twitter.py2
-rwxr-xr-xmain.py3
4 files changed, 4 insertions, 5 deletions
diff --git a/cogs/general.py b/cogs/general.py
index 0ad808a..c772f58 100755
--- a/cogs/general.py
+++ b/cogs/general.py
@@ -387,7 +387,7 @@ class MyHelpCommand(commands.MinimalHelpCommand):
def get_command_signature(self, command):
return f"``{self.clean_prefix}{command.qualified_name} {command.signature}``"
- def get_ending_note(self):
+ def get_ending_note(self) -> str:
return self.messages[randint(0, len(self.messages) - 1)]
diff --git a/cogs/trans.py b/cogs/trans.py
index d2aead2..88e6b76 100755
--- a/cogs/trans.py
+++ b/cogs/trans.py
@@ -6,7 +6,7 @@ from google.cloud import translate_v2 as translate
translate_client = translate.Client()
-async def translateMsg(text, target="en"):
+async def translateMsg(text: str, target="en": str) -> str:
# Text can also be a sequence of strings, in which case this method
# will return a sequence of results for each text.
if isinstance(text, six.binary_type):
diff --git a/cogs/twitter.py b/cogs/twitter.py
index d633b8e..ff2ea8f 100755
--- a/cogs/twitter.py
+++ b/cogs/twitter.py
@@ -11,7 +11,7 @@ class StreamListener(tweepy.StreamListener):
with open("./config.json") as f:
self.config = json.load(f)
- def on_error(self, status_code):
+ def on_error(self, status_code: int) -> bool:
if status_code == 420:
print("Rate limit reached. ")
# returning False in on_error disconnects the stream
diff --git a/main.py b/main.py
index 3b008ff..f19cc50 100755
--- a/main.py
+++ b/main.py
@@ -2,9 +2,8 @@ import asyncio
import json
import logging
-from colorama import init as init_colorama
-
from bot import BedrockBot
+from colorama import init as init_colorama
def check_jsons():