Used early outs to reduce indentation
This commit is contained in:
12
starling
12
starling
@@ -170,7 +170,7 @@ class StarlingClient:
|
||||
if count == 0:
|
||||
# I don't think this should happen!
|
||||
print('This holder has no accounts.')
|
||||
else:
|
||||
return
|
||||
if count == 1:
|
||||
print('This holder has one account:')
|
||||
else:
|
||||
@@ -187,18 +187,18 @@ class StarlingClient:
|
||||
payees = self.payees().payees
|
||||
count = len(payees)
|
||||
if count == 0:
|
||||
print('There are no payees for this customer.')
|
||||
else:
|
||||
print('There are no payees for this account holder.')
|
||||
return
|
||||
if count == 1:
|
||||
print('There is one payee for this customer:')
|
||||
print('There is one payee for this account holder:')
|
||||
else:
|
||||
print(f'There are {count} payees for this customer:')
|
||||
print(f'There are {count} payees for this account holder:')
|
||||
for payee in payees:
|
||||
sys.stdout.write(f' {payee.payeeName} ({payee.payeeType}) - ')
|
||||
count = len(payee.accounts)
|
||||
if count == 0:
|
||||
print('no accounts.')
|
||||
else:
|
||||
continue
|
||||
if count == 1:
|
||||
print('one account:')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user