mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Remove more unnecessary singleton lint exemptions
If testing truthy/falsy we should be using is
This commit is contained in:
parent
db70f9ae20
commit
e6b1eef4c2
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user