[pep8] - F841 - remove unused style, exc

pull/6/head
Laetitia Gangloff 2014-08-12 14:32:56 +02:00
parent c58940efe3
commit 86d11702c5
4 changed files with 3 additions and 17 deletions

View File

@ -375,7 +375,7 @@ class CommonReportHeaderWebkit(common_report_header):
(tuple(period_ids), account_id)) (tuple(period_ids), account_id))
res = self.cursor.dictfetchone() res = self.cursor.dictfetchone()
except Exception, exc: except Exception:
self.cursor.rollback() self.cursor.rollback()
raise raise
@ -549,7 +549,7 @@ FROM account_move_line l
try: try:
self.cursor.execute(monster, (tuple(move_line_ids),)) self.cursor.execute(monster, (tuple(move_line_ids),))
res = self.cursor.dictfetchall() res = self.cursor.dictfetchall()
except Exception, exc: except Exception:
self.cursor.rollback() self.cursor.rollback()
raise raise
return res or [] return res or []
@ -578,7 +578,7 @@ WHERE move_id in %s"""
try: try:
self.cursor.execute(sql, (account_id, limit, tuple(move_ids))) self.cursor.execute(sql, (account_id, limit, tuple(move_ids)))
res = self.cursor.fetchall() res = self.cursor.fetchall()
except Exception as exc: except Exception:
self.cursor.rollback() self.cursor.rollback()
raise raise
return res and dict(res) or {} return res and dict(res) or {}

View File

@ -153,8 +153,6 @@ class general_ledger_xls(report_xls):
# Column Initial Balance Row # Column Initial Balance Row
cell_format = _xs['italic'] + _xs['borders_all'] cell_format = _xs['italic'] + _xs['borders_all']
c_init_cell_style = xlwt.easyxf(cell_format) c_init_cell_style = xlwt.easyxf(cell_format)
c_init_cell_style_right = xlwt.easyxf(cell_format + _xs['right'])
c_init_cell_style_center = xlwt.easyxf(cell_format + _xs['center'])
c_init_cell_style_decimal = xlwt.easyxf( c_init_cell_style_decimal = xlwt.easyxf(
cell_format + _xs['right'], cell_format + _xs['right'],
num_format_str=report_xls.decimal_format) num_format_str=report_xls.decimal_format)
@ -188,7 +186,6 @@ class general_ledger_xls(report_xls):
# cell styles for ledger lines # cell styles for ledger lines
ll_cell_format = _xs['borders_all'] ll_cell_format = _xs['borders_all']
ll_cell_style = xlwt.easyxf(ll_cell_format) ll_cell_style = xlwt.easyxf(ll_cell_format)
ll_cell_style_right = xlwt.easyxf(ll_cell_format + _xs['right'])
ll_cell_style_center = xlwt.easyxf(ll_cell_format + _xs['center']) ll_cell_style_center = xlwt.easyxf(ll_cell_format + _xs['center'])
ll_cell_style_date = xlwt.easyxf( ll_cell_style_date = xlwt.easyxf(
ll_cell_format + _xs['left'], ll_cell_format + _xs['left'],

View File

@ -157,15 +157,10 @@ class partner_ledger_xls(report_xls):
c_hdr_cell_style = xlwt.easyxf(cell_format) c_hdr_cell_style = xlwt.easyxf(cell_format)
c_hdr_cell_style_right = xlwt.easyxf(cell_format + _xs['right']) c_hdr_cell_style_right = xlwt.easyxf(cell_format + _xs['right'])
c_hdr_cell_style_center = xlwt.easyxf(cell_format + _xs['center']) c_hdr_cell_style_center = xlwt.easyxf(cell_format + _xs['center'])
c_hdr_cell_style_decimal = xlwt.easyxf(
cell_format + _xs['right'],
num_format_str=report_xls.decimal_format)
# Column Initial Balance Row # Column Initial Balance Row
cell_format = _xs['italic'] + _xs['borders_all'] cell_format = _xs['italic'] + _xs['borders_all']
c_init_cell_style = xlwt.easyxf(cell_format) c_init_cell_style = xlwt.easyxf(cell_format)
c_init_cell_style_right = xlwt.easyxf(cell_format + _xs['right'])
c_init_cell_style_center = xlwt.easyxf(cell_format + _xs['center'])
c_init_cell_style_decimal = xlwt.easyxf( c_init_cell_style_decimal = xlwt.easyxf(
cell_format + _xs['right'], cell_format + _xs['right'],
num_format_str=report_xls.decimal_format) num_format_str=report_xls.decimal_format)
@ -209,7 +204,6 @@ class partner_ledger_xls(report_xls):
# cell styles for ledger lines # cell styles for ledger lines
ll_cell_format = _xs['borders_all'] ll_cell_format = _xs['borders_all']
ll_cell_style = xlwt.easyxf(ll_cell_format) ll_cell_style = xlwt.easyxf(ll_cell_format)
ll_cell_style_right = xlwt.easyxf(ll_cell_format + _xs['right'])
ll_cell_style_center = xlwt.easyxf(ll_cell_format + _xs['center']) ll_cell_style_center = xlwt.easyxf(ll_cell_format + _xs['center'])
ll_cell_style_date = xlwt.easyxf( ll_cell_style_date = xlwt.easyxf(
ll_cell_format + _xs['left'], ll_cell_format + _xs['left'],
@ -238,7 +232,6 @@ class partner_ledger_xls(report_xls):
row_pos = self.xls_write_row( row_pos = self.xls_write_row(
ws, row_pos, row_data, c_title_cell_style) ws, row_pos, row_data, c_title_cell_style)
row_pos += 1 row_pos += 1
row_start_account = row_pos
for partner_name, p_id, p_ref, p_name in \ for partner_name, p_id, p_ref, p_name in \
account.partners_order: account.partners_order:

View File

@ -293,13 +293,9 @@ class partners_balance_xls(report_xls):
# cell styles for account data # cell styles for account data
regular_cell_format = _xs['borders_all'] regular_cell_format = _xs['borders_all']
regular_cell_style = xlwt.easyxf(regular_cell_format) regular_cell_style = xlwt.easyxf(regular_cell_format)
regular_cell_style_center = xlwt.easyxf(
regular_cell_format + _xs['center'])
regular_cell_style_decimal = xlwt.easyxf( regular_cell_style_decimal = xlwt.easyxf(
regular_cell_format + _xs['right'], regular_cell_format + _xs['right'],
num_format_str=report_xls.decimal_format) num_format_str=report_xls.decimal_format)
regular_cell_style_pct = xlwt.easyxf(
regular_cell_format + _xs['center'], num_format_str='0')
row_pos += 1 row_pos += 1
for current_account in objects: for current_account in objects: