Skip to content

🚀 Feature: use linting tools (pre-commit) #60

@Ananya2001-an

Description

@Ananya2001-an

🔖 Feature description

I think we can use famous linting tools like black, flake8 and isort to keep the code style consistent and maybe we can use pre-commit hook to make sure the format is correct before making any unnecessary commits.

In some files like here:

we have unused imports like io in this case which can be easily detected using something like this. We can use husky as well....

We can also later on add a ci workflow to make sure lint tests pass. wdyt?

🎤 Pitch

We can use pre-commit as a dev dependency and create a .pre-commit-config.yaml file in the root dir like this:

repos:
- repo: https://github.com/psf/black
  rev: 23.3.0
  hooks:
    - id: black
      language_version: python3
      args: [appwrite]
- repo: https://github.com/pycqa/flake8
  rev: 5.0.4
  hooks:
    - id: flake8
      args:
        - "--max-line-length=120"
- repo: https://github.com/pycqa/isort
  rev: 5.11.5
  hooks:
    - id: isort
      name: isort (python)
      args: [--filter-files]

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions