From 68289c6a2c6ffefafd5ce8233db3a1732d20527e Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 2 Nov 2023 20:10:06 +0100 Subject: [PATCH] Apply RUF --- advlabdb/adminModelViews.py | 9 ++++++--- pyproject.toml | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/advlabdb/adminModelViews.py b/advlabdb/adminModelViews.py index a727a3e..01e1e60 100644 --- a/advlabdb/adminModelViews.py +++ b/advlabdb/adminModelViews.py @@ -193,7 +193,8 @@ class UserView(SecureAdminModelView): "active_semester", "current_login_at", ] - column_details_list = column_list + [ + column_details_list = [ + *column_list, "phone_number", "mobile_phone_number", "building", @@ -482,7 +483,8 @@ class StudentView(SecureAdminModelView): "first_name", "last_name", ] - column_searchable_list = column_sortable_list + [ + column_searchable_list = [ + *column_sortable_list, "uni_email", "contact_email", ] @@ -716,7 +718,8 @@ class ExperimentView(SecureAdminModelView): "title", ] - form_columns = column_list + [ + form_columns = [ + *column_list, "description", "wiki_link", "building", diff --git a/pyproject.toml b/pyproject.toml index 620dc40..22b9bbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ select = [ "PL", "NPY", "PERF", + "RUF", ] ignore = [ "E5", @@ -59,6 +60,7 @@ ignore = [ "PLW2901", "PLR2004", "PERF203", + "RUF012", ] line-length = 120