Webperf-se / webperf_core

webperf-core is an open-source testing suite tailored to help you improve your digital presence in areas like web performance, security and accessibility to email best practice using many small improvements.
https://webperf.se/articles/webperf-core/
MIT License
19 stars 30 forks source link

Proposal to Adopt PEP 8 and PyLint for Improved Code Quality #291

Open cockroacher opened 7 months ago

cockroacher commented 7 months ago

@marcusosterberg @7h3Rabbit

I would like to propose that we start using PEP 8 and PyLint in this project. Here's why I believe this would be beneficial:

  1. Consistency: PEP 8 provides a set of guidelines for writing Python code. By adhering to these guidelines, we can ensure that our codebase remains consistent, which makes it easier to read and understand.

  2. Code Quality: PyLint is a tool that checks for errors in Python code, enforces a coding standard, and looks for code smells. It can also help us to identify potential issues early in the development process.

  3. Maintainability: Both PEP 8 and PyLint promote best practices in Python that lead to more maintainable code. This can save us time in the long run, as it can make it easier to debug, refactor, and add new features to our code.

  4. Collaboration: When all contributors follow the same guidelines, it can make the collaboration process smoother. It can also help new contributors to get up to speed with our codebase more quickly.

I believe that by adopting PEP 8 and PyLint, we can improve the overall quality of our code and make our project more robust and maintainable. I look forward to hearing your thoughts on this proposal.

7h3Rabbit commented 7 months ago

I'm all for it. How screwed am I? I guess I have much to learn? 😄 Do you have suggestion on how to start? From your proposal I guess we have a long way to go?

cockroacher commented 7 months ago

Here’s how I propose we proceed:

  1. Run Pylint once: I will run Pylint across our entire codebase and create a separate issue for each file that raises a warning or error. This will help us track the progress of our code quality improvements.

  2. Create issues: For each file that Pylint flags, I will create a new issue detailing the warnings or errors that need to be addressed. This will allow us to tackle the problems incrementally and ensure that no issue is overlooked.

  3. Add a GitHub workflow: To prevent future issues, I will add a GitHub workflow that runs Pylint on every check-in. This will help us catch and fix issues before they’re merged into the main branch.

By taking these steps, we can ensure that our codebase remains clean and maintainable. Let’s start improving our code quality today! 🚀

cockroacher commented 7 months ago

Related:

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

7h3Rabbit commented 6 months ago

@cockroacher I updated issues from updated pylint github action output.