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

Improve Code Quality with Automated Formatting and Linting #32

Open
CyrilBaah opened this issue Oct 5, 2024 · 3 comments
Open

Improve Code Quality with Automated Formatting and Linting #32

CyrilBaah opened this issue Oct 5, 2024 · 3 comments

Comments

@CyrilBaah
Copy link

  • Improvement:
    Enhance code formatting and Linting Standards with Pre-configured Tools (Black, Flake8, Isort)
  • Reason:
    Ensure code adheres to formatting standards and best practices, catching issues early in the CI/CD pipeline.
  • Benefits:
    Automating these tools will streamline code reviews, improve quality, and simplify adherence to Python best practices for all contributors.
@berkingurcan
Copy link
Collaborator

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
Copy link
Contributor

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
Copy link
Collaborator

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?

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

3 participants