MinaFoundation / PGT_LeaderBot

Tool that will track and rank contributions across the different Mina developer programs
4 stars 5 forks source link

Improve Code Quality with Automated Formatting and Linting #32

Open CyrilBaah opened 3 weeks ago

CyrilBaah commented 3 weeks ago
berkingurcan commented 2 weeks ago

This suggestion might be redundant if Black is already applied since Black is a highly opinionated formatter that overrides other tools' formatting rules. What do you think @ramazanoacar ?

ramazanoacar commented 2 weeks ago

Hello @berkingurcan

Actually, I find it very useful to use isort or any other approach (maybe manually) for sorting and dividing the imports according to their types. Black covers some aspects of Flake8, but not every aspect. I believe Flake8 should be utilized when starting a project from the very begining and Black is enough for now. However, it is not up to me to decide.

Maybe, this issue and that one could be summed up to a bigger issue of fully refactoring the repo with addition of the following subtasks:

  1. Adding the above or some other given pre commit hooks
  2. Refactoring the structure of the folders
  3. Reducing the complexity and increasing the readability of the code by dividing some bigger functions into smaller unit functions.
  4. Enhancing the use of helpers.py functions or any other utility function by moving functions into more related and modular util files. (such as but not limited to separating each bot, db, spreadsheet etc. function to different functions)
berkingurcan commented 2 weeks ago

Hello @berkingurcan

Actually, I find it very useful to use isort or any other approach (maybe manually) for sorting and dividing the imports according to their types. Black covers some aspects of Flake8, but not every aspect. I believe Flake8 should be utilized when starting a project from the very begining and Black is enough for now. However, it is not up to me to decide.

Maybe, this issue and that one could be summed up to a bigger issue of fully refactoring the repo with addition of the following subtasks:

1. Adding the above or some other given pre commit hooks

2. Refactoring the structure of the folders

3. Reducing the complexity and increasing the readability of the code by dividing some bigger functions into smaller unit functions.

4. Enhancing the use of helpers.py functions or any other utility function by moving functions into more related and modular util files. (such as but not limited to separating each bot, db, spreadsheet etc. function to different functions)

Thank you for suggestions, yes it is a good idea to concatenate these issues. @CyrilBaah What do you think?