mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Utils] Tools for marking things unsafe for general use (#2326)
* Tools for marking things unsafe for general use * I'm facepalming so much... Actually, make the two do something different instead of getting distracted writing different docs for both based on intended usage. * local scopes mmkay + tests * Move file to adress feedback * typo fix * Update __init__.py * Fix issue with exported names in __init__ * changelog
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import colorama as _colorama
|
||||
import discord as _discord
|
||||
import yaml as _yaml
|
||||
|
||||
from .. import __version__, version_info, VersionInfo
|
||||
from .config import Config
|
||||
from .utils.safety import warn_unsafe as _warn_unsafe
|
||||
|
||||
__all__ = ["Config", "__version__", "version_info", "VersionInfo"]
|
||||
|
||||
@@ -10,3 +12,6 @@ _colorama.init()
|
||||
|
||||
# Prevent discord PyNaCl missing warning
|
||||
_discord.voice_client.VoiceClient.warn_nacl = False
|
||||
|
||||
# Warn on known unsafe usage of dependencies
|
||||
_yaml.load = _warn_unsafe(_yaml.load, "Use yaml.safe_load instead. See CVE-2017-18342")
|
||||
|
||||
Reference in New Issue
Block a user