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

Apply code formatting for accessibility to Jupyter notebooks (and Quarto code cells?) #338

Open
mfisher87 opened this issue Jun 12, 2024 · 0 comments

Comments

@mfisher87
Copy link
Member

mfisher87 commented Jun 12, 2024

Code formatting can significantly improve the accessibility of code in addition to enforcing consistency. Reviewing a how-to today on the mentor call I noticed some Python code that I felt could be formatted more accessibly. The Black project is a Python code formatter that puts readability first.

We can use the black-jupyter code formatter, or maybe something else, to do this using CI. I think the formatting can be very accessible using pre-commit.ci, so formatting can be done automatically by posting a comment containing the magic words "pre-commit.ci autofix" to any PR. We can use PR templates to instruct PR authors of this as well.

There's a Quarto extension too, but not sure about how to make the user experience good: https://github.com/shafayetShafee/black-formatter

Thoughts?

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

No branches or pull requests

1 participant