@@ -101,7 +101,7 @@ def single_value_row(row_name: str, single_value: float | None = None) -> list[A
101
101
102
102
def is_only_commas (s : str ) -> bool :
103
103
# TODO this is a silly way to test whether entries in row are None
104
- return re .match (r'^,+$' , s )
104
+ return re .match (r'^,+$' , s ) is not None
105
105
106
106
for line in lines :
107
107
if is_only_commas (',' .join (line )):
@@ -189,6 +189,9 @@ def is_only_commas(s: str) -> bool:
189
189
'Debt up-front fee ($)' : 'cost_debt_upfront' ,
190
190
'Debt balance ($)' : 'cf_debt_balance' ,
191
191
'Debt total payment ($)' : 'cf_debt_payment_total' ,
192
+ 'Federal income tax rate (frac)' : 'cf_federal_tax_frac' ,
193
+ 'Cash available for debt service (CAFDS) ($)' : 'cf_cash_for_ds' ,
194
+ 'DSCR (pre-tax)' : 'cf_pretax_dscr' ,
192
195
}
193
196
194
197
@@ -264,7 +267,10 @@ def data_preview(sg_2):
264
267
# etc.
265
268
return suggest
266
269
267
- show_suggestions (next (it for it in display_name .lower ().split (' ' ) if it .lower () != 'total' ))
270
+ try :
271
+ show_suggestions (next (it for it in display_name .lower ().split (' ' ) if it .lower () != 'total' ))
272
+ except StopIteration :
273
+ _log .debug (f'No { ld } suggestions for "{ display_name } " found' )
268
274
269
275
except Exception as e :
270
276
_log .debug (f'Encountered exception attempting to generate suggestions for { ld } for "{ display_name } ": { e } "' )
0 commit comments