From 2519d08e40661e5eb19a197510cacd16185defd0 Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Sat, 18 Sep 2021 10:11:46 +0200 Subject: [PATCH] remove breakpoints() + blackify --- app/scodoc/sco_archives_etud.py | 9 +++++++-- app/scodoc/sco_groups_view.py | 10 ++++++---- app/scodoc/sco_prepajury.py | 9 +++++++-- app/scodoc/sco_saisie_notes.py | 5 +++-- app/scodoc/sco_trombino.py | 5 +++-- app/views/scolar.py | 2 -- app/views/users.py | 1 - 7 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app/scodoc/sco_archives_etud.py b/app/scodoc/sco_archives_etud.py index 49432a6e..d2482a8f 100644 --- a/app/scodoc/sco_archives_etud.py +++ b/app/scodoc/sco_archives_etud.py @@ -269,8 +269,13 @@ def etudarchive_generate_excel_sample(group_id=None, REQUEST=None): ], extra_cols=["fichier_a_charger"], ) - breakpoint() - return scu.send_file(data, "ImportFichiersEtudiants", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + data, + "ImportFichiersEtudiants", + scu.XLSX_SUFFIX, + scu.XLSX_MIMETYPE, + attached=True, + ) # return sco_excel.send_excel_file(REQUEST, data, "ImportFichiersEtudiants" + scu.XLSX_SUFFIX) diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index 67f8c9da..219f103c 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -722,8 +722,9 @@ def groups_table( server_name=REQUEST.BASE0, ) filename = "liste_%s" % groups_infos.groups_filename + ".xlsx" - breakpoint() - return scu.send_file(xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True + ) # return sco_excel.send_excel_file(REQUEST, xls, filename) elif format == "allxls": # feuille Excel avec toutes les infos etudiants @@ -793,8 +794,9 @@ def groups_table( title = "etudiants_%s" % groups_infos.groups_filename xls = sco_excel.excel_simple_table(titles=titles, lines=L, sheet_name=title) filename = title + scu.XLSX_SUFFIX - breakpoint() - return scu.send_file(xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True + ) # return sco_excel.send_excel_file(REQUEST, xls, filename) else: raise ValueError("unsupported format") diff --git a/app/scodoc/sco_prepajury.py b/app/scodoc/sco_prepajury.py index d0efe744..3e4559a4 100644 --- a/app/scodoc/sco_prepajury.py +++ b/app/scodoc/sco_prepajury.py @@ -323,6 +323,11 @@ def feuille_preparation_jury(formsemestre_id, REQUEST): ) ) xls = ws.generate() - breakpoint() - return scu.send_file(xls, f"PrepaJury{sn}{scu.XLSX_SUFFIX}", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + xls, + f"PrepaJury{sn}{scu.XLSX_SUFFIX}", + scu.XLSX_SUFFIX, + scu.XLSX_MIMETYPE, + attached=True, + ) # return sco_excel.send_excel_file(REQUEST, xls, f"PrepaJury{sn}{scu.XLSX_SUFFIX}") diff --git a/app/scodoc/sco_saisie_notes.py b/app/scodoc/sco_saisie_notes.py index 4691c5a0..dc50a1ae 100644 --- a/app/scodoc/sco_saisie_notes.py +++ b/app/scodoc/sco_saisie_notes.py @@ -829,8 +829,9 @@ def feuille_saisie_notes(evaluation_id, group_ids=[], REQUEST=None): filename = "notes_%s_%s.xlsx" % (evalname, gr_title_filename) xls = sco_excel.excel_feuille_saisie(E, sem["titreannee"], description, lines=L) - breakpoint() - return scu.send_file(xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + xls, filename, scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True + ) # return sco_excel.send_excel_file(REQUEST, xls, filename) diff --git a/app/scodoc/sco_trombino.py b/app/scodoc/sco_trombino.py index 6edd0185..89b3935e 100644 --- a/app/scodoc/sco_trombino.py +++ b/app/scodoc/sco_trombino.py @@ -486,8 +486,9 @@ def photos_generate_excel_sample(group_ids=[], REQUEST=None): ], extra_cols=["fichier_photo"], ) - breakpoint() - return scu.send_file(data, "ImportPhotos", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) + return scu.send_file( + data, "ImportPhotos", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True + ) # return sco_excel.send_excel_file(REQUEST, data, "ImportPhotos" + scu.XLSX_SUFFIX) diff --git a/app/views/scolar.py b/app/views/scolar.py index 3dd12ca4..781b966f 100644 --- a/app/views/scolar.py +++ b/app/views/scolar.py @@ -1937,7 +1937,6 @@ def import_generate_excel_sample(REQUEST, with_codesemestre="1"): data = sco_import_etuds.sco_import_generate_excel_sample( format, with_codesemestre, exclude_cols=["photo_filename"] ) - breakpoint() return scu.send_file(data, "ImportEtudiants", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) # return sco_excel.send_excel_file(REQUEST, data, "ImportEtudiants" + scu.XLSX_SUFFIX) @@ -1957,7 +1956,6 @@ def import_generate_admission_sample(REQUEST, formsemestre_id): exclude_cols=["nationalite", "foto", "photo_filename"], group_ids=[group["group_id"]], ) - breakpoint() return scu.send_file(data, "AdmissionEtudiants", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) # return sco_excel.send_excel_file(REQUEST, data, "AdmissionEtudiants" + scu.XLSX_SUFFIX) diff --git a/app/views/users.py b/app/views/users.py index cde830a9..e69b02a7 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -488,7 +488,6 @@ def create_user_form(REQUEST, user_name=None, edit=0, all_roles=1): def import_users_generate_excel_sample(REQUEST): "une feuille excel pour importation utilisateurs" data = sco_import_users.generate_excel_sample() - breakpoint() return scu.send_file(data, "ImportUtilisateurs", scu.XLSX_SUFFIX, scu.XLSX_MIMETYPE, attached=True) # return sco_excel.send_excel_file(REQUEST, data, "ImportUtilisateurs" + scu.XLSX_SUFFIX)