fix(updatechecker): final pylint fixes (for now)
All checks were successful
Actions / Lint Code (Pylint) (pull_request) Successful in 18s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 13s

This commit is contained in:
Seaswimmer 2024-01-07 19:29:01 +00:00
parent 45fcc00cdb
commit 88ee068cbd
Signed by: cswimr
GPG key ID: D74DDDDF420E13DF

View file

@ -365,7 +365,7 @@ class UpdateChecker(commands.Cog):
"""Add repos to the whitelist""" """Add repos to the whitelist"""
data = await self.conf.whitelist() data = await self.conf.whitelist()
ds = set(data) ds = set(data)
ns = set([r.name for r in repos]) ns = {r.name for r in repos}
ss = ds | ns ss = ds | ns
await self.conf.whitelist.set(list(ss)) await self.conf.whitelist.set(list(ss))
await ctx.send(f"Whitelist update successful: {humanize_list(tuple(map(inline, ss)))}") await ctx.send(f"Whitelist update successful: {humanize_list(tuple(map(inline, ss)))}")
@ -375,7 +375,7 @@ class UpdateChecker(commands.Cog):
"""Remove repos from the whitelist""" """Remove repos from the whitelist"""
data = await self.conf.whitelist() data = await self.conf.whitelist()
ds = set(data) ds = set(data)
ns = set([r.name for r in repos]) ns = {r.name for r in repos}
ss = ds - ns ss = ds - ns
await self.conf.whitelist.set(list(ss)) await self.conf.whitelist.set(list(ss))
await ctx.send( await ctx.send(
@ -397,7 +397,7 @@ class UpdateChecker(commands.Cog):
"""Add repos to the blacklist""" """Add repos to the blacklist"""
data = await self.conf.blacklist() data = await self.conf.blacklist()
ds = set(data) ds = set(data)
ns = set([r.name for r in repos]) ns = {r.name for r in repos}
ss = ds | ns ss = ds | ns
await self.conf.blacklist.set(list(ss)) await self.conf.blacklist.set(list(ss))
await ctx.send(f"Backlist update successful: {humanize_list(tuple(map(inline, ss)))}") await ctx.send(f"Backlist update successful: {humanize_list(tuple(map(inline, ss)))}")
@ -407,7 +407,7 @@ class UpdateChecker(commands.Cog):
"""Remove repos from the blacklist""" """Remove repos from the blacklist"""
data = await self.conf.blacklist() data = await self.conf.blacklist()
ds = set(data) ds = set(data)
ns = set([r.name for r in repos]) ns = {r.name for r in repos}
ss = ds - ns ss = ds - ns
await self.conf.blacklist.set(list(ss)) await self.conf.blacklist.set(list(ss))
await ctx.send( await ctx.send(