diff options
| author | 2018-04-17 13:34:36 +0200 | |
|---|---|---|
| committer | 2018-04-17 13:34:36 +0200 | |
| commit | ed8fa4cb8b4aa7378ac4487ab5d0fcb1582fe856 (patch) | |
| tree | 046c61660b1292702dd94e4b8ddbe46b256ef382 /bot/cogs/math.py | |
| parent | Allow Admins to use the eval cog. (#51) (diff) | |
[ClickUp #21zkw] Python-syntax calls are now the default for all commands, but bracketless calls are still available as aliases. This makes the help output completely uniform. I also removed NoCategory and just added those commands to the Bot category to reduce clutter, and made bot.print the default and bot.echo an alias. Also renamed the EvalCog to CodeEval to be more uniform. new bot.help output attached to this PR. Some of the noqa's in the math and eval files had to be changed to pass flake8. (#52)
Diffstat (limited to 'bot/cogs/math.py')
| -rw-r--r-- | bot/cogs/math.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/math.py b/bot/cogs/math.py index 911ce587c..659faa764 100644 --- a/bot/cogs/math.py +++ b/bot/cogs/math.py @@ -6,7 +6,7 @@ import sys from contextlib import suppress from io import BytesIO from re import search -from subprocess import PIPE, Popen, STDOUT, TimeoutExpired # noqa: B404 S404 +from subprocess import PIPE, Popen, STDOUT, TimeoutExpired # noqa: B404,S404 from discord import File from discord.ext.commands import command @@ -24,7 +24,7 @@ async def run_sympy(sympy_code: str, calc: bool = False, timeout: int = 10) -> s # They're trying to exploit something, raise an error raise TypeError("'__' not allowed in sympy code") - proc = Popen([ # noqa: B603 S603 + proc = Popen([ # noqa: B603,S603 sys.executable, "-c", "import sys,sympy;from sympy.parsing.sympy_parser import parse_expr;" f"print(sympy.latex({code_}))", sympy_code |