fix(moderation): pylint fixes
Some checks failed
Pylint / Pylint (3.11) (push) Failing after 44s

This commit is contained in:
Seaswimmer 2023-12-18 19:00:16 -05:00
parent 082323f17c
commit faebd2629c
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE
5 changed files with 10 additions and 8 deletions

View file

@ -14,4 +14,7 @@
too-many-statements,
arguments-differ,
too-many-return-statements,
import-outside-toplevel
import-outside-toplevel,
import-self,
relative-beyond-top-level,
duplicate-code

View file

@ -1,5 +1,5 @@
import json
from datetime import datetime, timedelta
from datetime import timedelta
from typing import Dict
from discord import ButtonStyle, Interaction, Message, ui

View file

@ -1018,7 +1018,7 @@ class Moderation(commands.Cog):
for target_id, moderation_id, role_id in zip(target_ids, moderation_ids, role_ids):
try:
member: discord.Member = await guild.fetch_member(target_id)
# member: discord.Member = await guild.fetch_member(target_id)
role: discord.Role = guild.get_role(role_id)
if role is None:

View file

@ -2,14 +2,14 @@ from redbot.core import Config
config: Config = Config.get_conf(None, identifier=481923957134912, cog_name="Moderation")
def register_config(config: Config):
config.register_global(
def register_config(config_obj: Config):
config_obj.register_global(
mysql_address= " ",
mysql_database = " ",
mysql_username = " ",
mysql_password = " "
)
config.register_guild(
config_obj.register_guild(
use_discord_permissions = True,
ignore_other_bots = True,
dm_users = True,
@ -22,7 +22,7 @@ def register_config(config: Config):
auto_evidenceformat = False,
blacklist_roles = []
)
config.register_user(
config_obj.register_user(
history_ephemeral = None,
history_inline = None,
history_pagesize = None,

View file

@ -221,7 +221,6 @@ async def log(interaction: Interaction, moderation_id: int, resolved: bool = Fal
async def send_evidenceformat(interaction: Interaction, case_dict: dict):
"""This function sends an ephemeral message to the moderator who took the moderation action, with a pre-made codeblock for use in the mod-evidence channel."""
from .embed_factory import embed_factory
from .config import config
send_evidence_bool = (await config.user(interaction.user).auto_evidenceformat()
or await config.guild(interaction.guild).auto_evidenceformat()