Remove more unnecessary singleton lint exemptions

If testing truthy/falsy we should be using is
This commit is contained in:
Zedifus 2022-04-02 02:58:31 +01:00
parent db70f9ae20
commit e6b1eef4c2
3 changed files with 4 additions and 8 deletions

View File

@ -227,8 +227,7 @@ class Permissions_Servers:
def get_server_user_list(server_id): def get_server_user_list(server_id):
final_users = [] final_users = []
server_roles = Role_Servers.select().where(Role_Servers.server_id == server_id) server_roles = Role_Servers.select().where(Role_Servers.server_id == server_id)
# pylint: disable=singleton-comparison super_users = Users.select().where(Users.superuser is True)
super_users = Users.select().where(Users.superuser == True)
for role in server_roles: for role in server_roles:
users = User_Roles.select().where(User_Roles.role_id == role.role_id) users = User_Roles.select().where(User_Roles.role_id == role.role_id)
for user in users: for user in users:

View File

@ -260,8 +260,7 @@ class helper_servers:
@staticmethod @staticmethod
def is_crashed(server_id): def is_crashed(server_id):
svr = Server_Stats.select().where(Server_Stats.server_id == server_id).get() svr = Server_Stats.select().where(Server_Stats.server_id == server_id).get()
# pylint: disable=singleton-comparison if svr.crashed is True:
if svr.crashed == True:
return True return True
else: else:
return False return False

View File

@ -221,8 +221,7 @@ class helper_users:
@staticmethod @staticmethod
def get_super_user_list(): def get_super_user_list():
final_users = [] final_users = []
# pylint: disable=singleton-comparison super_users = Users.select().where(Users.superuser is True)
super_users = Users.select().where(Users.superuser == True)
for suser in super_users: for suser in super_users:
if suser.user_id not in final_users: if suser.user_id not in final_users:
final_users.append(suser.user_id) final_users.append(suser.user_id)
@ -251,8 +250,7 @@ class helper_users:
@staticmethod @staticmethod
def clear_support_status(): def clear_support_status():
# pylint: disable=singleton-comparison Users.update(preparing=False).where(Users.preparing is True).execute()
Users.update(preparing=False).where(Users.preparing == True).execute()
@staticmethod @staticmethod
def user_id_exists(user_id): def user_id_exists(user_id):