Commit 3ebf77d9 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

[autopep8] E124 - Align closing bracket to match visual indentation

parent 1439b4d49eaa
......@@ -62,9 +62,9 @@ class AbstractFlowGenerator:
top_table = Table([[self.get_metadata(entity),
u"",
self.get_person_name(entity)],
],
],
[11.5 * cm, 0.5 * cm, 7 * cm]
)
)
top_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -72,7 +72,7 @@ class AbstractFlowGenerator:
('RIGHTPADDING', (0, 0), (-1, -1), 0 * cm),
('TOPPADDING', (0, 0), (-1, -1), 0 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0 * cm),
])
])
)
flow_list.append(top_table)
......@@ -89,9 +89,9 @@ class AbstractFlowGenerator:
bottom_table = Table([[self.get_total_relative_data(entity),
u" ",
self.get_total(entity)],
],
],
[12.5 * cm, 0.5 * cm, 6 * cm]
)
)
bottom_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -99,7 +99,7 @@ class AbstractFlowGenerator:
('RIGHTPADDING', (0, 0), (-1, -1), 0 * cm),
('TOPPADDING', (0, 0), (-1, -1), 0 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0 * cm),
])
])
)
flow_list.append(KeepTogether(bottom_table))
......@@ -207,9 +207,9 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
col_data.append(Paragraph(s, style_metadata))
meta_table = Table([[col_data],
],
],
[11.5 * cm]
)
)
meta_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -218,7 +218,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
])
])
)
return meta_table
......@@ -265,7 +265,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
tot_table = Table(tab_data,
[3.25 * cm, 2.75 * cm]
)
)
tot_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -275,7 +275,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
('INNERGRID', (0, 0), (-1, -1), 0.02 * cm, black),
])
])
)
return tot_table
......@@ -302,9 +302,9 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
if col_data != []:
rel_table = Table([[col_data],
],
],
[12.5 * cm]
)
)
rel_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -313,7 +313,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
])
])
)
return rel_table
......@@ -378,7 +378,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
# adds a table built with the two previously defined lines
tab_data.append([self._build_inner_tables(lin_data_1, lin_data_2)
])
])
# Writes the accounting lines
for exp_line in entity.has_lines:
......@@ -425,12 +425,12 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
# adds a table built with the two previously defined lines
tab_data.append([self._build_inner_tables(lin_data_1, lin_data_2)
])
])
# Builds the main table that will be returned
main_table = Table(tab_data,
[19 * cm]
)
)
main_table.repeatRows = 1
main_table.setStyle(
TableStyle([
......@@ -460,9 +460,9 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
"""
# Builds table for the first line
line1_table = Table([line1_data
],
],
[2.25 * cm, 14 * cm, 2.75 * cm]
)
)
line1_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, 0), 'LEFT'),
('VALIGN', (0, 0), (-1, 0), 'TOP'),
......@@ -471,15 +471,15 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, 0), 0.1 * cm),
('BOTTOMPADDING', (0, 0), (-1, 0), 0.1 * cm),
('INNERGRID', (0, 0), (-1, 0), 0.02 * cm, black),
])
])
)
# Builds table for the second line
line2_table = Table([line2_data
],
],
[4.25 * cm, 4.5 * cm, 2.25 * cm, 1.25 * cm, 1.75 * cm, 2.75 * cm,
2.25 * cm]
)
)
line2_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, 0), 'LEFT'),
('VALIGN', (0, 0), (-1, 0), 'TOP'),
......@@ -489,15 +489,15 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('BOTTOMPADDING', (0, 0), (-1, 0), 0.1 * cm),
('INNERGRID', (0, 0), (-1, 0), 0.02 * cm, black),
('LINEABOVE', (0, 0), (-1, 0), 0.02 * cm, black),
])
])
)
# Builds the table that contains the two lines describing the expense
both_lines_table = Table([[line1_table],
[line2_table]
],
],
[19 * cm]
)
)
both_lines_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -506,7 +506,7 @@ class ExpenseFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, -1), 0 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0 * cm),
('BOX', (0, 0), (-1, -1), 0.02 * cm, black),
])
])
)
return both_lines_table
......@@ -574,9 +574,9 @@ class RefundFlowGenerator (AbstractFlowGenerator):
# Builds address table
addr_table = Table([[col_data],
],
],
[7 * cm]
)
)
addr_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -585,7 +585,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
])
])
)
return addr_table
......@@ -608,9 +608,9 @@ class RefundFlowGenerator (AbstractFlowGenerator):
# Builds the total table
tot_table = Table([lin_data
],
],
[3.25 * cm, 2.75 * cm]
)
)
tot_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -620,7 +620,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
('INNERGRID', (0, 0), (-1, -1), 0.02 * cm, black),
])
])
)
return tot_table
......@@ -652,9 +652,9 @@ class RefundFlowGenerator (AbstractFlowGenerator):
# Builds payment table
payment_table = Table([[col_data],
],
],
[12.5 * cm]
)
)
payment_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
('VALIGN', (0, 0), (-1, -1), 'TOP'),
......@@ -663,7 +663,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
('TOPPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOTTOMPADDING', (0, 0), (-1, -1), 0.2 * cm),
('BOX', (0, 0), (-1, -1), 0.05 * cm, black),
])
])
)
return payment_table
......@@ -745,7 +745,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
main_table = Table(tab_data,
[2.25 * cm, 7 * cm, 1.75 * cm, 2.25 * cm, 1.25 * cm, 1.75 * cm,
2.75 * cm]
)
)
main_table.repeatRows = 1
main_table.setStyle(
TableStyle([('ALIGN', (0, 0), (-1, -1), 'LEFT'),
......@@ -762,7 +762,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
('LINEAFTER', (4, 0), (4, -1), 0.02 * cm, black),
('LINEAFTER', (5, 0), (5, -1), 0.05 * cm, black),
('LINEBELOW', (0, 0), (-1, 0), 0.05 * cm, black),
])
])
)
return main_table
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment