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.11.tar.gz (4.0 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.11-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.11.tar.gz
Algorithm Hash digest
SHA256 5666381098bb681415d14586cb9fe92b220fa1b26fed8c907282c312d5444e84
MD5 278decfe5bc6ea97ec70f0da6175c7b0
BLAKE2b-256 022ee5104d41175efa1e7cdfc91ef8d33c89c7f6e712c0c38c3d279db7096d64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 8c537df37c5714be4989116ad44b2d374bd2a74d23d778fb5eb9f1ea7d372309
MD5 9191ae0908dd2b922249147c40c03c7e
BLAKE2b-256 d6c3fc605eb59ea6231360c0e6b10149a4135c3dd31bed5d55478e9a15fec801

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