diff options
| author | 2018-03-29 09:30:42 +0100 | |
|---|---|---|
| committer | 2018-03-29 09:30:42 +0100 | |
| commit | 6e2bd0b8bab870fd089233db39f8304c0ebf6dbe (patch) | |
| tree | be425227bc9cdc042e062e57851a74341cb48fd0 | |
| parent | Bump flake8-bandit from 1.0.1 to 1.0.2 (#39) (diff) | |
Try to make flake8-bandit happy
| -rw-r--r-- | bot/cogs/cogs.py | 2 | ||||
| -rw-r--r-- | bot/cogs/eval.py | 2 | ||||
| -rw-r--r-- | bot/cogs/math.py | 4 | ||||
| -rw-r--r-- | bot/formatter.py | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/bot/cogs/cogs.py b/bot/cogs/cogs.py index 0079b5e93..fb65b6009 100644 --- a/bot/cogs/cogs.py +++ b/bot/cogs/cogs.py @@ -271,7 +271,7 @@ class Cogs: icon_url=BOT_AVATAR_URL ) - for key, value in self.cogs.items(): + for key, _value in self.cogs.items(): if "." not in key: continue diff --git a/bot/cogs/eval.py b/bot/cogs/eval.py index c37c1f449..9ad0dd9ba 100644 --- a/bot/cogs/eval.py +++ b/bot/cogs/eval.py @@ -166,7 +166,7 @@ async def func(): # (None,) -> Any """.format(textwrap.indent(code, ' ')) try: - exec(_code, self.env) # noqa: B102 pylint: disable=exec-used + exec(_code, self.env) # noqa: B102 S102 pylint: disable=exec-used func = self.env['func'] res = await func() diff --git a/bot/cogs/math.py b/bot/cogs/math.py index 5fd8433c5..911ce587c 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 +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 + 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 diff --git a/bot/formatter.py b/bot/formatter.py index 1722dbf3c..245023753 100644 --- a/bot/formatter.py +++ b/bot/formatter.py @@ -71,7 +71,7 @@ class Formatter(HelpFormatter): # get the args using the handy inspect module argspec = getfullargspec(self.command.callback) arguments = formatargspec(*argspec) - for arg, annotation in argspec.annotations.items(): + for _arg, annotation in argspec.annotations.items(): # remove module name to only show class name # discord.ext.commands.context.Context -> Context arguments = arguments.replace(f"{annotation.__module__}.", "") |