stratosphereips / AIVPN

The AI VPN provides an security assessment of VPN clients' network traffic to identify cyber security threats.
https://aivpn.readthedocs.io
GNU General Public License v3.0
82 stars 19 forks source link

Proposal to adopt Black for code formatting #53

Open ay-bh opened 7 months ago

ay-bh commented 7 months ago

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.