mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Ignore fuzzywuzzy slow sequence matcher warning (#2096)
* Ignore fuzzywuzzy slow sequence matcher warning Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Add log.info call instead Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
parent
775f4ce69a
commit
1dbe9537e9
@ -1,6 +1,7 @@
|
|||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
import discord
|
import discord
|
||||||
from colorama import init, Back
|
from colorama import init
|
||||||
|
|
||||||
init()
|
init()
|
||||||
# Let's do all the dumb version checking in one place.
|
# Let's do all the dumb version checking in one place.
|
||||||
@ -12,3 +13,6 @@ if discord.version_info.major < 1:
|
|||||||
" >= 1.0.0."
|
" >= 1.0.0."
|
||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Filter fuzzywuzzy slow sequence matcher warning
|
||||||
|
warnings.filterwarnings("ignore", module=r"fuzzywuzzy.*")
|
||||||
|
|||||||
@ -63,7 +63,7 @@ def init_loggers(cli_flags):
|
|||||||
os.environ["PYTHONASYNCIODEBUG"] = "1"
|
os.environ["PYTHONASYNCIODEBUG"] = "1"
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
else:
|
else:
|
||||||
logger.setLevel(logging.WARNING)
|
logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
from redbot.core.data_manager import core_data_path
|
from redbot.core.data_manager import core_data_path
|
||||||
|
|
||||||
|
|||||||
@ -170,6 +170,12 @@ def init_events(bot, cli_flags):
|
|||||||
print("\nInvite URL: {}\n".format(invite_url))
|
print("\nInvite URL: {}\n".format(invite_url))
|
||||||
|
|
||||||
bot.color = discord.Colour(await bot.db.color())
|
bot.color = discord.Colour(await bot.db.color())
|
||||||
|
try:
|
||||||
|
import Levenshtein
|
||||||
|
except ImportError:
|
||||||
|
log.info(
|
||||||
|
"python-Levenshtein is not installed, fuzzy string matching will be a bit slower."
|
||||||
|
)
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_error(event_method, *args, **kwargs):
|
async def on_error(event_method, *args, **kwargs):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user