From 80c03f022bc300f7019a5ac81cabceb414954bdc Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 14 Sep 2023 12:08:20 +0200 Subject: [PATCH] Fix some typos --- app/api/etudiants.py | 1 - app/but/bulletin_but.py | 2 +- app/but/jury_but.py | 1 - app/models/modules.py | 10 +++++----- app/views/assiduites.py | 10 +++------- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/app/api/etudiants.py b/app/api/etudiants.py index 5c0c981bb..29132a99e 100755 --- a/app/api/etudiants.py +++ b/app/api/etudiants.py @@ -27,7 +27,6 @@ from app.models import ( FormSemestreInscription, FormSemestre, Identite, - ScoDocSiteConfig, ) from app.scodoc import sco_bulletins from app.scodoc import sco_groups diff --git a/app/but/bulletin_but.py b/app/but/bulletin_but.py index 4cf2e88c2..452c0b254 100644 --- a/app/but/bulletin_but.py +++ b/app/but/bulletin_but.py @@ -512,7 +512,7 @@ class BulletinBUT: d["nbabs"], d["nbabsjust"] = self.res.formsemestre.get_abs_count(etud.id) # --- Decision Jury - infos, dpv = sco_bulletins.etud_descr_situation_semestre( + infos, _ = sco_bulletins.etud_descr_situation_semestre( etud.id, self.res.formsemestre, format="html", diff --git a/app/but/jury_but.py b/app/but/jury_but.py index 22cbc070a..4309342b2 100644 --- a/app/but/jury_but.py +++ b/app/but/jury_but.py @@ -67,7 +67,6 @@ from flask import flash, g, url_for from app import db from app import log -from app.but import cursus_but from app.but.cursus_but import EtudCursusBUT from app.but.rcue import RegroupementCoherentUE from app.comp.res_but import ResultatsSemestreBUT diff --git a/app/models/modules.py b/app/models/modules.py index 9fafe5cb3..b4aa00ad8 100644 --- a/app/models/modules.py +++ b/app/models/modules.py @@ -182,8 +182,8 @@ class Module(db.Model): Les coefs nuls (zéro) ne sont pas stockés: la relation est supprimée. """ if self.formation.has_locked_sems(self.ue.semestre_idx): - current_app.logguer.info( - f"set_ue_coef_dict: locked formation, ignoring request" + current_app.logger.info( + "set_ue_coef_dict: locked formation, ignoring request" ) raise ScoValueError("Formation verrouillée") changed = False @@ -213,8 +213,8 @@ class Module(db.Model): def update_ue_coef_dict(self, ue_coef_dict: dict): """update coefs vers UE (ajoute aux existants)""" if self.formation.has_locked_sems(self.ue.semestre_idx): - current_app.logguer.info( - f"update_ue_coef_dict: locked formation, ignoring request" + current_app.logger.info( + "update_ue_coef_dict: locked formation, ignoring request" ) raise ScoValueError("Formation verrouillée") current = self.get_ue_coef_dict() @@ -232,7 +232,7 @@ class Module(db.Model): def delete_ue_coef(self, ue): """delete coef""" if self.formation.has_locked_sems(self.ue.semestre_idx): - current_app.logguer.info( + current_app.logger.info( "delete_ue_coef: locked formation, ignoring request" ) raise ScoValueError("Formation verrouillée") diff --git a/app/views/assiduites.py b/app/views/assiduites.py index 145e28a18..d54f0cde8 100644 --- a/app/views/assiduites.py +++ b/app/views/assiduites.py @@ -46,27 +46,23 @@ CSSSTYLES = html_sco_header.BOOTSTRAP_MULTISELECT_CSS # --- UTILS --- -class HTMLElement: - """""" - - class HTMLElement: """Représentation d'un HTMLElement version Python""" def __init__(self, tag: str, *attr, **kattr) -> None: self.tag: str = tag - self.children: list[HTMLElement] = [] + self.children: list["HTMLElement"] = [] self.self_close: bool = kattr.get("self_close", False) self.text_content: str = kattr.get("text_content", "") self.key_attributes: dict[str, any] = kattr self.attributes: list[str] = list(attr) - def add(self, *child: HTMLElement) -> None: + def add(self, *child: "HTMLElement") -> None: """add child element to self""" for kid in child: self.children.append(kid) - def remove(self, child: HTMLElement) -> None: + def remove(self, child: "HTMLElement") -> None: """Remove child element from self""" if child in self.children: self.children.remove(child)