Browse Source

[pep8] - F841 - remove unused style, exc

pull/6/head
Laetitia Gangloff 10 years ago
parent
commit
86d11702c5
  1. 6
      account_financial_report_webkit/report/common_reports.py
  2. 3
      account_financial_report_webkit_xls/report/general_ledger_xls.py
  3. 7
      account_financial_report_webkit_xls/report/partner_ledger_xls.py
  4. 4
      account_financial_report_webkit_xls/report/partners_balance_xls.py

6
account_financial_report_webkit/report/common_reports.py

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

3
account_financial_report_webkit_xls/report/general_ledger_xls.py

@ -153,8 +153,6 @@ class general_ledger_xls(report_xls):
# Column Initial Balance Row
cell_format = _xs['italic'] + _xs['borders_all']
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(
cell_format + _xs['right'],
num_format_str=report_xls.decimal_format)
@ -188,7 +186,6 @@ class general_ledger_xls(report_xls):
# cell styles for ledger lines
ll_cell_format = _xs['borders_all']
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_date = xlwt.easyxf(
ll_cell_format + _xs['left'],

7
account_financial_report_webkit_xls/report/partner_ledger_xls.py

@ -157,15 +157,10 @@ class partner_ledger_xls(report_xls):
c_hdr_cell_style = xlwt.easyxf(cell_format)
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_decimal = xlwt.easyxf(
cell_format + _xs['right'],
num_format_str=report_xls.decimal_format)
# Column Initial Balance Row
cell_format = _xs['italic'] + _xs['borders_all']
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(
cell_format + _xs['right'],
num_format_str=report_xls.decimal_format)
@ -209,7 +204,6 @@ class partner_ledger_xls(report_xls):
# cell styles for ledger lines
ll_cell_format = _xs['borders_all']
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_date = xlwt.easyxf(
ll_cell_format + _xs['left'],
@ -238,7 +232,6 @@ class partner_ledger_xls(report_xls):
row_pos = self.xls_write_row(
ws, row_pos, row_data, c_title_cell_style)
row_pos += 1
row_start_account = row_pos
for partner_name, p_id, p_ref, p_name in \
account.partners_order:

4
account_financial_report_webkit_xls/report/partners_balance_xls.py

@ -293,13 +293,9 @@ class partners_balance_xls(report_xls):
# cell styles for account data
regular_cell_format = _xs['borders_all']
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_format + _xs['right'],
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
for current_account in objects:

Loading…
Cancel
Save