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

Proposal to adopt Black for code formatting #53

Open
ay-bh opened this issue Mar 20, 2024 · 0 comments
Open

Proposal to adopt Black for code formatting #53

ay-bh opened this issue Mar 20, 2024 · 0 comments

Comments

@ay-bh
Copy link

ay-bh commented Mar 20, 2024

Is your feature request related to a problem? Please describe.
I've noticed that our repository does not currently enforce a consistent code formatting standard. This inconsistency can lead to a variety of issues, such as merge conflicts, difficulty in reading and reviewing code, and overall a decrease in developer efficiency. I'm always frustrated when I encounter code that is not uniformly formatted, as it takes additional time to understand and work with.

Describe the solution you'd like
I propose adopting the Black code formatter (https://github.com/psf/black) for our repository. Black is a well-regarded code formatter that automatically aligns code with PEP 8 standards, ensuring uniformity and readability across our codebase. Its adoption would automate the formatting process and improve our development workflow.

Describe alternatives you've considered
I have considered other code formatters like Flake8 and Pylint. While both are excellent tools for linting and identifying stylistic issues, they do not automatically reformat code to a standard as Black does. These tools could still play a complementary role in ensuring code quality, but for the specific issue of uniform code formatting, Black stands out as the most effective solution.

Additional context
From my past experience working on a project where Black was adopted, I saw firsthand the benefits it brought in terms of code quality and developer productivity. It reduced the time spent on discussing style in code reviews and helped new contributors adhere to our coding standards more easily. Given our project's open-source nature and the diversity of contributors, adopting Black could be an asset. If this Feature Request is accepted, I'm prepared to take the lead on formatting all existing files in the repository according to Black's standards and integrating Black into our Continuous Integration (CI) flow to ensure all future contributions are automatically formatted.

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