From 5f318a7228fa368981dc1c8ad3166dbef7c6949a Mon Sep 17 00:00:00 2001 From: DeveloperAnonymous <40847862+DeveloperAnonymous@users.noreply.github.com> Date: Sat, 17 Feb 2024 21:38:34 -0500 Subject: [PATCH] Fixed pylint issues --- .pylintrc | 3 ++- bot/db/models/bot_configs.py | 2 +- bot/db/models/entity.py | 3 --- bot/db/models/user.py | 1 - bot/db/services/configs_service.py | 4 ++-- bot/db/services/user_service.py | 2 +- bot/management/welcome.py | 1 - 7 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.pylintrc b/.pylintrc index 044025f..3890a91 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,7 +7,8 @@ min-public-methods=0 # Disable the message "C0114: Missing module docstring" # Disabled the message "W0511: fixme" # Disabled the message "R0913: Too many arguments" -disable=C0114, W0511, R0913 +# Disabled the message "W0212: Access to a protected member _ of a client class" +disable=C0114, W0511, R0913, W0212 [FORMAT] # Disabled the message "W0603: Using the global statement" diff --git a/bot/db/models/bot_configs.py b/bot/db/models/bot_configs.py index 415a6d9..0daa07d 100644 --- a/bot/db/models/bot_configs.py +++ b/bot/db/models/bot_configs.py @@ -13,7 +13,7 @@ class GlobalConfig(Entity): The name of the config. """ - __slots__ = ("_id",) + __slots__ = () def __init__(self, _id: str) -> None: """ diff --git a/bot/db/models/entity.py b/bot/db/models/entity.py index a2802f4..baba2b1 100644 --- a/bot/db/models/entity.py +++ b/bot/db/models/entity.py @@ -1,10 +1,7 @@ """Base entity class for all models""" -from abc import abstractmethod from datetime import datetime -from bot.db.services import BaseService - class Entity: """ diff --git a/bot/db/models/user.py b/bot/db/models/user.py index d387fdf..c0f9ec4 100644 --- a/bot/db/models/user.py +++ b/bot/db/models/user.py @@ -1,7 +1,6 @@ """ADEPT User model.""" from bot.db.models.entity import Entity -from bot.db.services.user_service import UserService class AdeptMember(Entity): diff --git a/bot/db/services/configs_service.py b/bot/db/services/configs_service.py index 125639e..cd46520 100644 --- a/bot/db/services/configs_service.py +++ b/bot/db/services/configs_service.py @@ -1,8 +1,8 @@ """Service for dynamic bot configs.""" -from ..models.bot_configs import GlobalConfig, SpamConfigs +from bot.db.models.bot_configs import GlobalConfig, SpamConfigs -from .base_service import BaseService +from bot.db.services.base_service import BaseService class ConfigsService(BaseService): diff --git a/bot/db/services/user_service.py b/bot/db/services/user_service.py index 6a7ca91..4c0651f 100644 --- a/bot/db/services/user_service.py +++ b/bot/db/services/user_service.py @@ -1,6 +1,6 @@ """User service.""" -from .base_service import BaseService +from bot.db.services.base_service import BaseService class UserService(BaseService): diff --git a/bot/management/welcome.py b/bot/management/welcome.py index 1fa82b7..611ffb8 100644 --- a/bot/management/welcome.py +++ b/bot/management/welcome.py @@ -6,7 +6,6 @@ import configs from bot import util, welcome from bot.db.services import UserService -from bot.db.models import AdeptMember class WelcomeCog(commands.Cog):