From bdfb7140139bed2e57984af0d7e3ddf8f022bd1e Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Mon, 26 Nov 2012 10:35:29 +0100 Subject: [PATCH] fixed pep8 in pdf.py --- .travis.yml | 2 +- openslides/utils/pdf.py | 144 ++++++++++++++++++++-------------------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba93efe7c..bad214ce7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ install: - python extras/scripts/create_local_settings.py script: - coverage run ./manage.py test tests && coverage report -m - - pep8 --max-line-length=150 --exclude="urls.py,motion/,pdf.py" --statistics openslides + - pep8 --max-line-length=150 --exclude="urls.py,motion/" --statistics openslides diff --git a/openslides/utils/pdf.py b/openslides/utils/pdf.py index 439d55744..4064f109e 100755 --- a/openslides/utils/pdf.py +++ b/openslides/utils/pdf.py @@ -116,93 +116,93 @@ stylesheet.add(ParagraphStyle( name='Tablecell', parent=stylesheet['Normal'], fontSize=9)) -stylesheet.add(ParagraphStyle(name = 'Signaturefield', - parent = stylesheet['Normal'], - spaceBefore = 15) +stylesheet.add(ParagraphStyle(name='Signaturefield', + parent=stylesheet['Normal'], + spaceBefore=15) ) # Ballot stylesheets -stylesheet.add(ParagraphStyle(name = 'Ballot_title', - parent = stylesheet['Bold'], - fontSize = 12, - leading = 14, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Ballot_title', + parent=stylesheet['Bold'], + fontSize=12, + leading=14, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_subtitle', - parent = stylesheet['Normal'], - fontSize = 10, - leading = 12, - leftIndent = 30, - rightIndent = 20, - spaceAfter = 5), +stylesheet.add(ParagraphStyle(name='Ballot_subtitle', + parent=stylesheet['Normal'], + fontSize=10, + leading=12, + leftIndent=30, + rightIndent=20, + spaceAfter=5), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_description', - parent = stylesheet['Normal'], - fontSize = 7, - leading = 10, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Ballot_description', + parent=stylesheet['Normal'], + fontSize=7, + leading=10, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_option', - parent = stylesheet['Normal'], - fontSize = 12, - leading = 24, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Ballot_option', + parent=stylesheet['Normal'], + fontSize=12, + leading=24, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Monotype', - parent = stylesheet['Normal'], - fontName = 'Courier', - fontSize = 12, - leading = 24, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Monotype', + parent=stylesheet['Normal'], + fontName='Courier', + fontSize=12, + leading=24, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_option_name', - parent = stylesheet['Normal'], - fontSize = 12, - leading = 15, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Ballot_option_name', + parent=stylesheet['Normal'], + fontSize=12, + leading=15, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_option_group', - parent = stylesheet['Normal'], - fontSize = 8, - leading = 15, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Ballot_option_group', + parent=stylesheet['Normal'], + fontSize=8, + leading=15, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_option_YNA', - parent = stylesheet['Normal'], - fontSize = 12, - leading = 15, - leftIndent = 49, - spaceAfter = 18), +stylesheet.add(ParagraphStyle(name='Ballot_option_YNA', + parent=stylesheet['Normal'], + fontSize=12, + leading=15, + leftIndent=49, + spaceAfter=18), ) -stylesheet.add(ParagraphStyle(name = 'Ballot_option_group_right', - parent = stylesheet['Normal'], - fontSize = 8, - leading = 16, - leftIndent = 49), +stylesheet.add(ParagraphStyle(name='Ballot_option_group_right', + parent=stylesheet['Normal'], + fontSize=8, + leading=16, + leftIndent=49), ) -stylesheet.add(ParagraphStyle(name = 'Badge_title', - parent = stylesheet['Bold'], - fontSize = 16, - leading = 22, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Badge_title', + parent=stylesheet['Bold'], + fontSize=16, + leading=22, + leftIndent=30), ) -stylesheet.add(ParagraphStyle(name = 'Badge_subtitle', - parent = stylesheet['Normal'], - fontSize = 12, - leading = 24, - leftIndent = 30), +stylesheet.add(ParagraphStyle(name='Badge_subtitle', + parent=stylesheet['Normal'], + fontSize=12, + leading=24, + leftIndent=30), ) stylesheet.add(ParagraphStyle( - name = 'Badge_italic', - parent = stylesheet['Italic'], - fontSize = 12, - leading = 24, - leftIndent = 30, + name='Badge_italic', + parent=stylesheet['Italic'], + fontSize=12, + leading=24, + leftIndent=30, )) stylesheet.add(ParagraphStyle( - name = 'Badge_qrcode', - fontSize = 12, - leftIndent = 190, + name='Badge_qrcode', + fontSize=12, + leftIndent=190, )) @@ -213,13 +213,13 @@ def firstPage(canvas, doc): canvas.setFillGray(0.4) title_line = u"%s | %s" % (config["event_name"], - config["event_description"]) + config["event_description"]) if len(title_line) > 75: title_line = "%s ..." % title_line[:70] canvas.drawString(2.75 * cm, 28 * cm, title_line) if config["event_date"] and config["event_location"]: canvas.drawString(2.75 * cm, 27.6 * cm, u"%s, %s" - % (config["event_date"], config["event_location"])) + % (config["event_date"], config["event_location"])) # time canvas.setFont('Ubuntu', 7)