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):
final_users = []
server_roles = Role_Servers.select().where(Role_Servers.server_id == server_id)
# pylint: disable=singleton-comparison
super_users = Users.select().where(Users.superuser == True)
super_users = Users.select().where(Users.superuser is True)
for role in server_roles:
users = User_Roles.select().where(User_Roles.role_id == role.role_id)
for user in users:

View File

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

View File

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