Fix some typos

This commit is contained in:
Emmanuel Viennet 2023-09-14 12:08:20 +02:00
parent 41944d9d65
commit 80c03f022b
5 changed files with 9 additions and 15 deletions

View File

@ -27,7 +27,6 @@ from app.models import (
FormSemestreInscription,
FormSemestre,
Identite,
ScoDocSiteConfig,
)
from app.scodoc import sco_bulletins
from app.scodoc import sco_groups

View File

@ -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",

View File

@ -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

View File

@ -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")

View File

@ -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)