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
Seems that adding -e also suppress the exception name and cause. It would be great to keep them while supressing the traceback
Example with Arpeggio library:
Failure in tests.unit.test_promql.TestPromQLConversion.test_conversion (expr='sum by(pod)(rate(metric_test_app[2m] * 60)')
File "/Users/ocervello/Workspace/dev/cloudops-migrator/tests/unit/test_promql.py", line 39, in test_conversion
convert_promql_to_mql(expr)
... 1000 lines of traceback
result = self._parse(parser)
File "/Users/ocervello/.virtualenvs/cloudops-migrator/lib/python3.8/site-packages/arpeggio/__init__.py", line 370, in _parse
result = e.parse(parser)
File "/Users/ocervello/.virtualenvs/cloudops-migrator/lib/python3.8/site-packages/arpeggio/__init__.py", line 789, in parse
result = self._parse(parser)
File "/Users/ocervello/.virtualenvs/cloudops-migrator/lib/python3.8/site-packages/arpeggio/__init__.py", line 898, in _parse
parser._nm_raise(self, c_pos, parser)
File "/Users/ocervello/.virtualenvs/cloudops-migrator/lib/python3.8/site-packages/arpeggio/__init__.py", line 1718, in _nm_raise
raise self.nm
arpeggio.NoMatch: Expected '[' or 'offset' or 'by' or '*' or '/' or '+' or '-' or 'or' or '>=' or '<=' or '>' or '<' or '==' or ')' at position (1, 43) => '[2m] * 60)*'.
Running with -e disables everything, but keeping just the last line would be super helpful (the traceback is pretty useless):
arpeggio.NoMatch: Expected '[' or 'offset' or 'by' or '*' or '/' or '+' or '-' or 'or' or '>=' or '<=' or '>' or '<' or '==' or ')' at position (1, 43) => '[2m] * 60)*'.
The text was updated successfully, but these errors were encountered:
Just searching for occurrences of no_tracebacks and doing the same thing with a new option in config.py should be enough to get a new option plumbed in, and then you would need to customize the output logic in result.py.
Closing due to lack of activity. I'd be happy to review a PR if someone wanted to give this a try, or reopen this issue if there is more to discuss. Otherwise, I'll consider the popular demand for this feature too low to bother with.
Seems that adding
-e
also suppress the exception name and cause. It would be great to keep them while supressing the tracebackExample with Arpeggio library:
Running with
-e
disables everything, but keeping just the last line would be super helpful (the traceback is pretty useless):The text was updated successfully, but these errors were encountered: