Skip to content

feat: Add pre-commit hooks for code quality (black, flake8, isort)#623

Open
abishop1990 wants to merge 2 commits intomicrosoft:mainfrom
abishop1990:issue-600-add-precommit-hooks
Open

feat: Add pre-commit hooks for code quality (black, flake8, isort)#623
abishop1990 wants to merge 2 commits intomicrosoft:mainfrom
abishop1990:issue-600-add-precommit-hooks

Conversation

@abishop1990
Copy link

Fixes #600

Changes

  1. Added .pre-commit-config.yaml with:

    • black (code formatting)
    • flake8 (linting + plugins)
    • isort (import sorting)
    • Standard hooks (trailing-whitespace, end-of-file-fixer, check-yaml, etc)
    • mypy (optional type checking)
  2. Added DEVELOPMENT.md with complete setup guide for developers

  3. Formatted entire codebase with pre-commit hooks

Why

Standardizes code quality across all contributions, reduces friction for new contributors.

Testing

  • Pre-commit hooks validated on entire codebase (156 files)
  • All hooks pass successfully
  • Code formatting verified

abishop1990 added 2 commits March 21, 2026 09:43
Implements automated code quality checks including:
- black: Code formatting (PEP 8 compliant)
- flake8: Linting (catches style issues, unused imports)
- isort: Import sorting and organization
- trailing-whitespace, end-of-file-fixer: Cleanup hooks
- check-yaml, check-merge-conflict: Safety hooks

Also adds DEVELOPMENT.md with comprehensive setup and usage guide for developers.

Fixes microsoft#600
Runs the full pre-commit hook suite on the entire codebase to establish a consistent code style baseline. This includes:
- black formatting (line length 100)
- isort import sorting
- flake8 linting
- trailing whitespace and EOF fixes
- YAML validation

This is the baseline formatting - future PRs will use these same hooks to maintain consistency.
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

Successfully merging this pull request may close these issues.

Pre-commit hooks, linting and formatting implementation

1 participant