Commit 23b99214 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

[autopep8] E26 - Fix spacing after comment hash for inline comments

parent d6314bb7280c
......@@ -56,7 +56,7 @@ class AbstractFlowGenerator:
be displayed in PDF.
Returns: [Flowable, ...]
"""
flow_list = [] # [Flowable, ...]
flow_list = [] # [Flowable, ...]
# top table containing on the left the metadata and on the right the
# name of the person concerned by the document
......@@ -585,7 +585,7 @@ class RefundFlowGenerator (AbstractFlowGenerator):
xml_escape(addr.city))
col_data.append(Paragraph(s, style_address))
else: # could not find related euser
else: # could not find related euser
s = u'<b>???</b>'
col_data.append(Paragraph(s, style_address))
......
......@@ -29,9 +29,9 @@ class PDFWriter(object):
self.company_data = company_data
# flow generator that can create the PDF content flow of the document.
self._flow_generator = None # AbstractFlowGenerator
self._flow_generator = None # AbstractFlowGenerator
# type of document to be generated
self._doc_type = None # string "expense" or "refund"
self._doc_type = None # string "expense" or "refund"
def __init_flow_generator(self, entity):
......
......@@ -32,7 +32,7 @@ class UpdateRefundStateOperation(hook.Operation):
# reset refund to None for this new account
ref = None
for _, user, line in lines:
if user is None: # this is a company account, no refund needed
if user is None: # this is a company account, no refund needed
break
ref = ref or self.get_or_create_refund_for(account)
# users don't have permissions to add lines to refunds
......
......@@ -25,7 +25,7 @@ class HelpersTC(CubicWebTC):
def accept(self, cnx, expense):
expense.cw_adapt_to('IWorkflowable').change_state('accepted')
cnx.commit() # to fire corresponding operations
cnx.commit() # to fire corresponding operations
def new_account(self, cnx, login):
user = self.create_user(cnx, login)
......
......@@ -43,7 +43,7 @@ class HooksTC(HelpersTC):
count = self.refund_lines_count(cnx, self.account1)
expense = cnx.create_entity('Expense', title=u'expense 1')
self.add_expense_line(cnx, expense, self.account1)
cnx.commit() # to fire corresponding operations
cnx.commit() # to fire corresponding operations
newcount = self.refund_lines_count(cnx, self.account1)
self.assertEqual(newcount, count)
self.accept(cnx, expense)
......@@ -58,7 +58,7 @@ class HooksTC(HelpersTC):
# force expense to its initial state, otherwise StatusChangeHook won't be called
cnx.commit()
self.assertEqual(len(MAILBOX), 0, MAILBOX)
self.accept(cnx, expense) # to fire corresponding operations
self.accept(cnx, expense) # to fire corresponding operations
self.assertEqual(len(MAILBOX), 1, MAILBOX)
self.assertCountEqual(MAILBOX[0].recipients, ['john@test.org'])
......@@ -73,7 +73,7 @@ class HooksTC(HelpersTC):
account1 = cnx.execute('Any X WHERE X eid %(x)s', {'x': self.account1}).get_entity(0, 0)
account1.reverse_to_account[0].cw_adapt_to('IWorkflowable').fire_transition('pay')
self.assertEqual(len(MAILBOX), 0, MAILBOX)
cnx.commit() # to fire corresponding operations
cnx.commit() # to fire corresponding operations
self.assertEqual(len(MAILBOX), 1, MAILBOX)
email1 = MAILBOX[0]
self.assertCountEqual(email1.recipients, ['john@test.org'])
......@@ -85,7 +85,7 @@ class HooksTC(HelpersTC):
rql = 'SET R in_state S WHERE R is Refund, R to_account A, A eid %(a)s, S name "paid", NOT R in_state S'
account1.cw_clear_all_caches()
account1.reverse_to_account[0].cw_adapt_to('IWorkflowable').fire_transition('pay')
cnx.commit() # to fire corresponding operations
cnx.commit() # to fire corresponding operations
email2 = MAILBOX[0]
self.assertCountEqual(email2.recipients, ['john@test.org'])
self.assertNotEqual(email2.message.get('Message-id'), email1.message.get('Message-id'))
......
......@@ -13,7 +13,7 @@ class SecurityTC(HelpersTC):
with self.new_access('john').repo_cnx() as cnx:
rset = cnx.execute('Any E WHERE E is Expense, E has_lines EE, EE paid_by PA, '
'E in_state S, S name "accepted", PA associated_to U, U eid %(u)s',
{'u': self.user1}) # user1 is john
{'u': self.user1}) # user1 is john
self.assertEqual(len(rset), 1)
expense = rset.get_entity(0, 0)
self.add_expense_line(cnx, expense, self.account1)
......@@ -44,7 +44,7 @@ class SecurityTC(HelpersTC):
with self.new_access('john').repo_cnx() as cnx:
rset = cnx.execute('Any EE WHERE E is Expense, E has_lines EE, EE paid_by PA, '
'E in_state S, S name "accepted", PA associated_to U, U eid %(u)s',
{'u': self.user1}) # user1 is john
{'u': self.user1}) # user1 is john
self.assertEqual(len(rset), 1)
lineeid = rset[0][0]
rql = 'INSERT Refund R: R has_lines E, R to_account A WHERE E eid %(e)s, A eid %(a)s'
......@@ -55,7 +55,7 @@ class SecurityTC(HelpersTC):
with self.new_access('john').repo_cnx() as cnx:
rset = cnx.execute('Any R WHERE R is Refund, R has_lines EE, EE paid_by PA, '
'R to_account PA, PA associated_to U, U eid %(u)s',
{'u': self.user1}) # user1 is john
{'u': self.user1}) # user1 is john
self.assertEqual(len(rset), 1)
line = self.new_expense_line(cnx, self.account1)
rql = 'SET R has_lines E WHERE E eid %(e)s'
......
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