Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of rich for formatters #1002

Open
ericwb opened this issue Mar 19, 2023 · 1 comment
Open

Make use of rich for formatters #1002

ericwb opened this issue Mar 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ericwb
Copy link
Member

ericwb commented Mar 19, 2023

Is your feature request related to a problem? Please describe.
Since now Bandit has a dependency on the module rich as a progress indicator, we can take further advantage of the library and use it for our output formatters.

In particular, rich.syntax can pretty print code snippets with line numbers and syntax formatting.
That could look nice in our screen.py formatter.

Describe the solution you'd like
Make use of rich.syntax in screen.py and possible others.

Describe alternatives you've considered
n/a

Additional context
https://rich.readthedocs.io/en/latest/syntax.html
https://rich.readthedocs.io/en/latest/reference/syntax.html

Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.

@ericwb ericwb added the enhancement New feature or request label Mar 19, 2023
@ericwb
Copy link
Member Author

ericwb commented Mar 19, 2023

rich.console also has the capability to render links in a terminal which could be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant