You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run black against a beancount file containing pushtag and poptag, it throws an error rather than accept the entry and continue. I'm using these entries as per the Beancount Syntax "The Tag Stack"
Traceback (most recent call last):
File "/Users/xxx/.pyenv/versions/3.12.5/lib/python3.12/site-packages/lark/lexer.py", line 665, in lex
yield lexer.next_token(lexer_state, parser_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xxx/.pyenv/versions/3.12.5/lib/python3.12/site-packages/lark/lexer.py", line 598, in next_token
raise UnexpectedCharacters(lex_state.text, line_ctr.char_pos, line_ctr.line, line_ctr.column,
lark.exceptions.UnexpectedCharacters: No terminal matches '#' in the current parser context, at line 6 col 9
pushtag #test
^
Expected one of:
* COLON
Previous tokens: Token('METADATA_KEY', 'pushtag')
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue. Currently, pushtag and poptag syntax are not implemented intentionally. Those syntax make beancount entries context dependent, therefore it's harder to sort the entries and regenerating the beancount file from the tree. I designed beancount-black to be opinioned regarding this. Unfortunately, we don't have the plan for supporting it in the short term.
When I run black against a beancount file containing pushtag and poptag, it throws an error rather than accept the entry and continue. I'm using these entries as per the Beancount Syntax "The Tag Stack"
Example file
cmd:
bh format test.beancount
Result:
The text was updated successfully, but these errors were encountered: