Skip to content

Add pre-commit hooks for black and markdownlint#36

Merged
gb119 merged 3 commits intomainfrom
copilot/add-precommit-hooks
Feb 11, 2026
Merged

Add pre-commit hooks for black and markdownlint#36
gb119 merged 3 commits intomainfrom
copilot/add-precommit-hooks

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Adds automated code formatting enforcement via pre-commit hooks.

Changes

  • .pre-commit-config.yaml: Configured black (line-length=119) and markdownlint hooks
  • pyproject.toml:
    • Added [tool.black] config with line-length=119, target versions py310-py313
    • Added black and pre-commit to dev dependencies
  • Code formatting: Applied black to 6 Python files (checker.py, test files, docs/conf.py)
  • CONTRIBUTING.md: Added pre-commit installation step and usage instructions

Usage

pip install -e ".[dev]"
pre-commit install  # Auto-runs on commit
pre-commit run --all-files  # Manual run

Notes

  • Black line-length (119) differs from ruff (100) to match existing markdownlint config
  • Black doesn't support py314 yet, limited to py313
Original prompt

Can we add precommit hooks to run black (with line length=119 characters) and markdownlint to fix python and markdown fomatting issues?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 11, 2026 16:42
Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Co-authored-by: gb119 <4428426+gb119@users.noreply.github.com>
Copilot AI changed the title [WIP] Add precommit hooks for black and markdownlint Add pre-commit hooks for black and markdownlint Feb 11, 2026
Copilot AI requested a review from gb119 February 11, 2026 16:46
@codacy-production
Copy link

codacy-production bot commented Feb 11, 2026

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ee97d34) 291 271 93.13%
Head commit (eabaff3) 291 (+0) 271 (+0) 93.13% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#36) 7 7 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21914081118

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.127%

Totals Coverage Status
Change from base Build 21913913712: 0.0%
Covered Lines: 271
Relevant Lines: 291

💛 - Coveralls

@gb119 gb119 marked this pull request as ready for review February 11, 2026 17:09
@gb119 gb119 merged commit b970b60 into main Feb 11, 2026
19 checks passed
@gb119 gb119 deleted the copilot/add-precommit-hooks branch February 11, 2026 17:09
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.

3 participants