Skip to content

Commit 71491ac

Browse files
committed
Update existing suppression comments
1 parent 0c359ef commit 71491ac

File tree

12 files changed

+28
-42
lines changed

12 files changed

+28
-42
lines changed

redbot/cogs/audio/core/utilities/miscellaneous.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,7 @@ def decode_track(self, track: str, decode_errors: str = "ignore") -> MutableMapp
378378
reader = DataReader(track)
379379

380380
flags = (reader.read_int() & 0xC0000000) >> 30
381-
(version,) = (
382-
struct.unpack("B", reader.read_byte()) if flags & 1 != 0 else 1
383-
) # pylint: disable=unused-variable
381+
(version,) = struct.unpack("B", reader.read_byte()) if flags & 1 != 0 else 1
384382

385383
title = reader.read_utf().decode(errors=decode_errors)
386384
author = reader.read_utf().decode()

redbot/cogs/audio/manager.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class ServerManager:
256256
def __init__(self, config: Config, cog: "Audio", timeout: Optional[int] = None) -> None:
257257
self.ready: asyncio.Event = asyncio.Event()
258258
self._config = config
259-
self._proc: Optional[asyncio.subprocess.Process] = None # pylint:disable=no-member
259+
self._proc: Optional[asyncio.subprocess.Process] = None
260260
self._shutdown: bool = False
261261
self.start_monitor_task = None
262262
self.timeout = timeout
@@ -326,13 +326,11 @@ async def _start(self, java_path: str) -> None:
326326
)
327327
)
328328
try:
329-
self._proc = (
330-
await asyncio.subprocess.create_subprocess_exec( # pylint:disable=no-member
331-
*args,
332-
cwd=str(LAVALINK_DOWNLOAD_DIR),
333-
stdout=asyncio.subprocess.PIPE,
334-
stderr=asyncio.subprocess.STDOUT,
335-
)
329+
self._proc = await asyncio.subprocess.create_subprocess_exec(
330+
*args,
331+
cwd=str(LAVALINK_DOWNLOAD_DIR),
332+
stdout=asyncio.subprocess.PIPE,
333+
stderr=asyncio.subprocess.STDOUT,
336334
)
337335
log.info("Managed Lavalink node started. PID: %s", self._proc.pid)
338336
try:
@@ -413,13 +411,11 @@ async def _has_java(self) -> Tuple[bool, Optional[Tuple[int, int]]]:
413411

414412
async def _get_java_version(self) -> Tuple[int, int]:
415413
"""This assumes we've already checked that java exists."""
416-
_proc: asyncio.subprocess.Process = (
417-
await asyncio.create_subprocess_exec( # pylint:disable=no-member
418-
self._java_exc,
419-
"-version",
420-
stdout=asyncio.subprocess.PIPE,
421-
stderr=asyncio.subprocess.PIPE,
422-
)
414+
_proc: asyncio.subprocess.Process = await asyncio.create_subprocess_exec(
415+
self._java_exc,
416+
"-version",
417+
stdout=asyncio.subprocess.PIPE,
418+
stderr=asyncio.subprocess.PIPE,
423419
)
424420
# java -version outputs to stderr
425421
_, err = await _proc.communicate()
@@ -533,7 +529,7 @@ async def _is_up_to_date(self):
533529
return True
534530
args, _ = await self._get_jar_args()
535531
args.append("--version")
536-
_proc = await asyncio.subprocess.create_subprocess_exec( # pylint:disable=no-member
532+
_proc = await asyncio.subprocess.create_subprocess_exec(
537533
*args,
538534
cwd=str(LAVALINK_DOWNLOAD_DIR),
539535
stdout=asyncio.subprocess.PIPE,

redbot/cogs/downloader/repo_manager.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ class Candidate(NamedTuple):
5353
description: str
5454

5555

56-
class _RepoCheckoutCtxManager(
57-
Awaitable[None], AsyncContextManager[None]
58-
): # pylint: disable=duplicate-bases
56+
class _RepoCheckoutCtxManager(Awaitable[None], AsyncContextManager[None]):
5957
def __init__(
6058
self,
6159
repo: Repo,

redbot/cogs/economy/economy.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,7 @@ async def slot_machine(author, channel, bid):
601601
sign = " "
602602
if i == 1:
603603
sign = ">"
604-
slot += "{}{} {} {}\n".format(
605-
sign, *[c.value for c in row] # pylint: disable=no-member
606-
)
604+
slot += "{}{} {} {}\n".format(sign, *[c.value for c in row])
607605

608606
payout = PAYOUTS.get(rows[1])
609607
if not payout:

redbot/core/bot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ class _NoOwnerSet(RuntimeError):
9191
# d.py autoshardedbot should be at the end
9292
# all of our mixins should happen before,
9393
# and must include a call to super().__init__ unless they do not provide an init
94-
class Red(
95-
commands.GroupMixin, RPCMixin, dpy_commands.bot.AutoShardedBot
96-
): # pylint: disable=no-member # barely spurious warning caused by shadowing
94+
class Red(commands.GroupMixin, RPCMixin, dpy_commands.bot.AutoShardedBot):
9795
"""Our subclass of discord.ext.commands.AutoShardedBot"""
9896

9997
def __init__(self, *args, cli_flags=None, bot_dir: Path = Path.cwd(), **kwargs):

redbot/core/commands/requires.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ def reset(self) -> None:
458458
This will clear all rules, including defaults. It also resets
459459
the `Requires.ready_event`.
460460
"""
461-
self._guild_rules.clear() # pylint: disable=no-member
462-
self._global_rules.clear() # pylint: disable=no-member
461+
self._guild_rules.clear()
462+
self._global_rules.clear()
463463
self.ready_event.clear()
464464

465465
async def verify(self, ctx: "Context") -> bool:
@@ -922,12 +922,12 @@ class _IntKeyDict(Dict[int, _T]):
922922
def __getitem__(self, key: Any) -> _T:
923923
if not isinstance(key, int):
924924
raise TypeError("Keys must be of type `int`")
925-
return super().__getitem__(key) # pylint: disable=no-member
925+
return super().__getitem__(key)
926926

927927
def __setitem__(self, key: Any, value: _T) -> None:
928928
if not isinstance(key, int):
929929
raise TypeError("Keys must be of type `int`")
930-
return super().__setitem__(key, value) # pylint: disable=no-member
930+
return super().__setitem__(key, value)
931931

932932

933933
class _RulesDict(Dict[Union[int, str], PermState]):
@@ -939,12 +939,12 @@ class _RulesDict(Dict[Union[int, str], PermState]):
939939
def __getitem__(self, key: Any) -> PermState:
940940
if key != Requires.DEFAULT and not isinstance(key, int):
941941
raise TypeError(f'Expected "{Requires.DEFAULT}" or int key, not "{key}"')
942-
return super().__getitem__(key) # pylint: disable=no-member
942+
return super().__getitem__(key)
943943

944944
def __setitem__(self, key: Any, value: PermState) -> None:
945945
if key != Requires.DEFAULT and not isinstance(key, int):
946946
raise TypeError(f'Expected "{Requires.DEFAULT}" or int key, not "{key}"')
947-
return super().__setitem__(key, value) # pylint: disable=no-member
947+
return super().__setitem__(key, value)
948948

949949

950950
def _validate_perms_dict(perms: Dict[str, bool]) -> None:

redbot/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_latest_confs() -> Tuple["Config"]:
6666
return tuple(ret)
6767

6868

69-
class _ValueCtxManager(Awaitable[_T], AsyncContextManager[_T]): # pylint: disable=duplicate-bases
69+
class _ValueCtxManager(Awaitable[_T], AsyncContextManager[_T]):
7070
"""Context manager implementation of config values.
7171
7272
This class allows mutable config values to be both "get" and "set" from

redbot/core/drivers/_mongo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from urllib.parse import quote_plus
1010

1111
try:
12-
# pylint: disable=import-error
1312
import motor.core
1413
import motor.motor_asyncio
1514
import pymongo.errors

redbot/core/drivers/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _save_json(path: Path, data: Dict[str, Any]) -> None:
252252
tmp_path.replace(path)
253253

254254
try:
255-
flag = os.O_DIRECTORY # pylint: disable=no-member
255+
flag = os.O_DIRECTORY
256256
except AttributeError:
257257
pass
258258
else:

redbot/core/drivers/postgres/postgres.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import Any, AsyncIterator, Callable, List, Optional, Tuple, Union
66

77
try:
8-
# pylint: disable=import-error
98
import asyncpg
109
except ModuleNotFoundError:
1110
asyncpg = None

0 commit comments

Comments
 (0)