Commit 6d0d0fcb authored by Jérome Perrin's avatar Jérome Perrin

*: refactor with 2to3's ne fixer

parent 1cb15442
......@@ -69,7 +69,7 @@ for inventory in node_inventory_list:
inv_line.updateCellRange(script_id='CashDetail_asCellRange', base_id=base_id)
# create cell
cell_range_key_list = inv_line.getCellRangeKeyList(base_id=base_id)
if cell_range_key_list <> [[None, None]] :
if cell_range_key_list != [[None, None]] :
for k in cell_range_key_list:
category_list = filter(lambda k_item: k_item is not None, k)
cell = inv_line.newCell(*k, **line_kwd)
......
......@@ -36,6 +36,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -61,6 +61,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -30,6 +30,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -19,6 +19,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -77,6 +77,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -25,6 +25,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -29,6 +29,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -41,6 +41,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -26,6 +26,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -27,6 +27,6 @@ resource = ob.CashDelivery_checkCounterInventory(source=vault, portal_type='Outg
if resource == 2:
msg = Message(domain="ui", message="No Returned banknote defined.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -32,6 +32,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -33,6 +33,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -38,6 +38,6 @@ if resource == 2:
elif amount != total_price:
msg = Message(domain="ui", message="Amount differ from total price.")
raise ValidationFailed(msg,)
elif resource <> 0 :
elif resource != 0 :
msg = Message(domain="ui", message="Insufficient Balance.")
raise ValidationFailed(msg,)
......@@ -22,13 +22,13 @@ else :
default_column_base = 'variation'
allow_add_line = False
if len(default_emission_letter_list) > 1 and default_column_base <> 'emission_letter':
if len(default_emission_letter_list) > 1 and default_column_base != 'emission_letter':
return_list.append(['emission_letter','Emission Letter'])
allow_add_line = True
if len(default_cash_status_list) > 1 and default_column_base <> 'cash_status':
if len(default_cash_status_list) > 1 and default_column_base != 'cash_status':
return_list.append(['cash_status','Cash Status'])
allow_add_line = True
if len(default_variation_list) > 1 and default_column_base <> 'variation':
if len(default_variation_list) > 1 and default_column_base != 'variation':
return_list.append(['variation','Variation'])
allow_add_line = True
......
......@@ -205,7 +205,7 @@ if not error:
line.updateCellRange(script_id='CashDetail_asCellRange', base_id=cell_base_id)
# create cell
cell_range_key_list = line.getCellRangeKeyList(base_id=cell_base_id)
if cell_range_key_list <> [[None, None]] :
if cell_range_key_list != [[None, None]] :
for k in cell_range_key_list:
# check we don't create a cell for variation which is not defined
key = "%s_%s_%s" %(k[2], k[0], k[1])
......
......@@ -49,7 +49,7 @@ for r_ticket in ticket_list:
for r_event_causality in event_causality_list:
event_causality = r_event_causality.getObject()
#check that one event it isn't related by causality and follow-up with the same ticket
if ticket.getUid() <> event_causality.getFollowUpUid():
if ticket.getUid() != event_causality.getFollowUpUid():
line_list.append(Object(uid='new_',
ticket='',
type=event_causality.getTranslatedPortalType(),
......
......@@ -23,7 +23,7 @@ for history_name in history_name_list:
history_element_title_list = []
for history_element_title in list_history_item[-1].keys():
if history_element_title <> history_name:
if history_element_title != history_name:
new_title = history_element_title.replace('_', ' ').title()
history_element_title_list.append(new_title)
......@@ -31,7 +31,7 @@ for history_name in history_name_list:
for history_item in list_history_item:
history_item_info = ()
for history_element_title in list_history_item[-1].keys():
if history_element_title <> history_name:
if history_element_title != history_name:
history_item_info += (history_item.get(history_element_title),)
history_item_list.append(history_item_info)
history_item_list.reverse()
......
......@@ -1197,7 +1197,7 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
line.setVariationCategoryList(variation_category_list)
line.updateCellRange(script_id='CashDetail_asCellRange', base_id=base_id)
cell_range_key_list = line.getCellRangeKeyList(base_id=base_id)
if cell_range_key_list <> [[None, None]] :
if cell_range_key_list != [[None, None]] :
for k in cell_range_key_list:
category_list = filter(lambda k_item: k_item is not None, k)
c = line.newCell(*k, **line_kwd)
......
Markdown is supported
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