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:
modimpl_id = modimpl["moduleimpl_id"]
tags = sco_tag_module.module_tag_list(
self.context, modimpl["module_id"]
) # liste des tags pour le modimpl concerné
# liste des tags pour le modimpl concerné:
tags = sco_tag_module.module_tag_list(modimpl["module_id"])
for (
tag

View File

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

View File

@ -150,9 +150,7 @@ class BulletinGenerator(object):
def get_filename(self):
"""Build a filename to be proposed to the web client"""
sem = sco_formsemestre.get_formsemestre(
self.context, self.infos["formsemestre_id"]
)
sem = sco_formsemestre.get_formsemestre(self.infos["formsemestre_id"])
dt = time.strftime("%Y-%m-%d")
filename = "bul-%s-%s-%s.pdf" % (
sem["titre_num"],
@ -214,7 +212,7 @@ class BulletinGenerator(object):
return objects
else:
# 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
document = sco_pdf.BaseDocTemplate(report)
document.addPageTemplates(

View File

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

View File

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