Skip to content

Setup black and isort for using pre-commit #36

@ParagEkbote

Description

@ParagEkbote

Why This Is Important

  • Consistency: Ensures all contributors follow the same code style and import ordering.
  • Quality: Improves readability and maintainability of the codebase.
  • Reliability: Prevents style-related issues from slipping into production.

Tasks

  • Add pre-commit configuration file (.pre-commit-config.yaml) to the repository.
  • Configure hooks for black (code formatter) and isort (import sorter).
  • Install pre-commit in the development environment (pip install pre-commit).
  • Run pre-commit install to enable hooks locally.
  • Test by committing code to verify that formatting and import sorting are applied automatically.
  • Update documentation (README or contributing guide) to explain usage.

Acceptance Criteria

  • .pre-commit-config.yaml exists with black and isort hooks configured.
  • Developers can run pre-commit install and see hooks applied on commit.
  • Code is automatically formatted with black and imports sorted with isort.
  • Documentation updated to guide contributors on setup and usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions