pylint
This commit is contained in:
parent
bb70ef8e38
commit
82f0612883
@ -693,7 +693,7 @@ class SeqGenTable:
|
||||
|
||||
def excel(self):
|
||||
"""Export des genTables dans un unique fichier excel avec plusieurs feuilles tagguées"""
|
||||
book = sco_excel.Workbook() # Le fichier xls en devenir
|
||||
book = sco_excel.Workbook() # pylint: disable=no-member
|
||||
for (_, gt) in self.genTables.items():
|
||||
gt.excel(wb=book) # Ecrit dans un fichier excel
|
||||
return book.savetostr()
|
||||
|
17
sco_pdf.py
17
sco_pdf.py
@ -31,7 +31,10 @@
|
||||
Tout accès à ReportLab doit donc être précédé d'un PDFLOCK.acquire()
|
||||
et terminé par un PDFLOCK.release()
|
||||
"""
|
||||
import time, cStringIO
|
||||
import time
|
||||
import cStringIO
|
||||
import re
|
||||
import os
|
||||
from types import StringType
|
||||
import unicodedata
|
||||
import traceback
|
||||
@ -49,9 +52,12 @@ from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
|
||||
from reportlab.lib import styles
|
||||
from reportlab.lib.pagesizes import letter, A4, landscape
|
||||
|
||||
from sco_utils import *
|
||||
import sco_utils as scu
|
||||
from sco_utils import CONFIG, SCO_ENCODING, SCODOC_LOGOS_DIR, LOGOS_IMAGES_ALLOWED_TYPES
|
||||
from notes_log import log
|
||||
from sco_exceptions import ScoGenError
|
||||
from SuppressAccents import suppression_diacritics
|
||||
import VERSION
|
||||
from VERSION import SCOVERSION, SCONAME
|
||||
|
||||
PAGE_HEIGHT = defaultPageSize[1]
|
||||
@ -107,7 +113,7 @@ def makeParas(txt, style, suppress_empty=False):
|
||||
if suppress_empty:
|
||||
r = []
|
||||
for para in paras:
|
||||
m = re.match("\s*<\s*para.*>\s*(.*)\s*<\s*/\s*para\s*>\s*", para)
|
||||
m = re.match(r"\s*<\s*para.*>\s*(.*)\s*<\s*/\s*para\s*>\s*", para)
|
||||
if not m:
|
||||
r.append(para) # not a paragraph, keep it
|
||||
else:
|
||||
@ -229,7 +235,10 @@ class ScolarsPageTemplate(PageTemplate):
|
||||
# ---- Logo: a small image, positionned at top left of the page
|
||||
if self.logo is not None:
|
||||
# draws the logo if it exists
|
||||
((width, height), image) = self.logo
|
||||
( # pylint: disable=unpacking-non-sequence
|
||||
(width, height),
|
||||
image,
|
||||
) = self.logo
|
||||
canvas.drawImage(image, inch, doc.pagesize[1] - inch, width, height)
|
||||
|
||||
# ---- Filigranne (texte en diagonal en haut a gauche de chaque page)
|
||||
|
Loading…
Reference in New Issue
Block a user