1
0
forked from ScoDoc/ScoDoc

fixes pylint

This commit is contained in:
Emmanuel Viennet 2021-08-20 01:22:44 +02:00
parent 3a8474f12d
commit be90a8d487
5 changed files with 8 additions and 11 deletions

View File

@ -159,9 +159,8 @@ class SemestreTag(pe_tagtable.TableTag):
for modimpl in self.modimpls: for modimpl in self.modimpls:
modimpl_id = modimpl["moduleimpl_id"] modimpl_id = modimpl["moduleimpl_id"]
tags = sco_tag_module.module_tag_list( # liste des tags pour le modimpl concerné:
self.context, modimpl["module_id"] tags = sco_tag_module.module_tag_list(modimpl["module_id"])
) # liste des tags pour le modimpl concerné
for ( for (
tag tag

View File

@ -477,7 +477,7 @@ def _get_abs_description(a, cursor=None):
if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL": if a["moduleimpl_id"] and a["moduleimpl_id"] != "NULL":
# Trouver le nom du module # Trouver le nom du module
Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list( Mlist = sco_moduleimpl.do_moduleimpl_withmodule_list(
None, moduleimpl_id=a["moduleimpl_id"] moduleimpl_id=a["moduleimpl_id"]
) )
if Mlist: if Mlist:
M = Mlist[0] M = Mlist[0]

View File

@ -150,9 +150,7 @@ class BulletinGenerator(object):
def get_filename(self): def get_filename(self):
"""Build a filename to be proposed to the web client""" """Build a filename to be proposed to the web client"""
sem = sco_formsemestre.get_formsemestre( sem = sco_formsemestre.get_formsemestre(self.infos["formsemestre_id"])
self.context, self.infos["formsemestre_id"]
)
dt = time.strftime("%Y-%m-%d") dt = time.strftime("%Y-%m-%d")
filename = "bul-%s-%s-%s.pdf" % ( filename = "bul-%s-%s-%s.pdf" % (
sem["titre_num"], sem["titre_num"],
@ -214,7 +212,7 @@ class BulletinGenerator(object):
return objects return objects
else: else:
# Generation du document PDF # Generation du document PDF
sem = sco_formsemestre.get_formsemestre(self.context, formsemestre_id) sem = sco_formsemestre.get_formsemestre(formsemestre_id)
report = io.BytesIO() # in-memory document, no disk file report = io.BytesIO() # in-memory document, no disk file
document = sco_pdf.BaseDocTemplate(report) document = sco_pdf.BaseDocTemplate(report)
document.addPageTemplates( document.addPageTemplates(

View File

@ -30,6 +30,8 @@
import time import time
from operator import itemgetter from operator import itemgetter
from flask import g
import app import app
from app.models import Departement from app.models import Departement
from app.scodoc import sco_codes_parcours from app.scodoc import sco_codes_parcours

View File

@ -122,9 +122,7 @@ class SemSet(dict):
"""Load formsemestres""" """Load formsemestres"""
self.sems = [] self.sems = []
for formsemestre_id in self.formsemestre_ids: for formsemestre_id in self.formsemestre_ids:
self.sems.append( self.sems.append(sco_formsemestre.get_formsemestre(formsemestre_id))
sco_formsemestre.get_formsemestre(self.context, formsemestre_id)
)
if self.sems: if self.sems:
self["date_debut"] = min([sem["date_debut_iso"] for sem in self.sems]) self["date_debut"] = min([sem["date_debut_iso"] for sem in self.sems])