Skip to main content

A pre-commit hook to check Python documentation using GitHub Copilot

Project description

Python Copilot Documentation Hook

A pre-commit hook that checks Python files for missing documentation and suggests using GitHub Copilot for documentation generation.

Installation

pip install python_copilot_docs_hook

Usage

Add to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/yourusername/python_copilot_docs_hook
    rev: v0.1.0
    hooks:
      - id: python-copilot-docs

Requirements

  • Python 3.6+
  • GitHub Copilot subscription
  • VS Code with Copilot extension

How it Works

  1. Hook checks Python files for missing documentation
  2. If missing docs are found:
    • Shows line numbers where docs are needed
    • Suggests using Alt+\ to trigger Copilot suggestions
  3. Commit fails if any files are missing documentation

Development

# Clone repository
git clone https://github.com/yourusername/python_copilot_docs_hook.git
cd python_copilot_docs_hook

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install development dependencies
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_copilot_docs_hook-0.1.15.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_copilot_docs_hook-0.1.15-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file python_copilot_docs_hook-0.1.15.tar.gz.

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.15.tar.gz
Algorithm Hash digest
SHA256 123c29e0d8a21e68f774c1b86ee2066a8c89e22979238c73667988a0a34e5084
MD5 df988e6292c82e9094327d9f79ed00fb
BLAKE2b-256 0bd7b25fd99552823fcffc2e80eec0aac83b4d552a9066f6eaec36c07ce3f699

See more details on using hashes here.

File details

Details for the file python_copilot_docs_hook-0.1.15-py3-none-any.whl.

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 dabe0cafe8c935e6a6279b80d0e72a8add544b44d44cd0f39eec78e192b403d3
MD5 a2c7971b014e2aeb052fd3e0abd90461
BLAKE2b-256 a35c6676336ce63d71e6148e61efe3c72c14750757e0368a5c9afb95ab26cdbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page