Changeset - 328f59231c08
[Not reviewed]
0 2 0
Brett Smith - 3 years ago 2021-02-11 16:17:24
brettcsmith@brettcsmith.org
meta_tax_implication: Accept titlecased values.
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/meta_tax_implication.py
Show inline comments
...
 
@@ -26,6 +26,9 @@ def _make_aliases(s: str, stdname: Optional[str]=None) -> Iterator[Tuple[str, st
 
    elif s != stdname:
 
        yield (s, stdname)
 
    yield (s.lower(), stdname)
 
    title_s = s.title()
 
    if s != title_s:
 
        yield (title_s, stdname)
 
    if s.startswith('1099-'):
 
        yield from _make_aliases(f'1099{s[5:]}', stdname)
 
    elif s.startswith('USA-'):
tests/test_meta_tax_implication.py
Show inline comments
...
 
@@ -15,7 +15,7 @@ VALID_VALUES = {
 
    '1099': '1099-NEC',
 
    '1099-NEC': '1099-NEC',
 
    '1099nec': '1099-NEC',
 
    '1099-MISC-Other': '1099-MISC-Other',
 
    '1099-Misc-Other': '1099-MISC-Other',
 
    '1099misc-other': '1099-MISC-Other',
 
    'Bank-Transfer': 'Bank-Transfer',
 
    'Chargeback': 'Chargeback',
0 comments (0 inline, 0 general)