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.12.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.12-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.12.tar.gz
Algorithm Hash digest
SHA256 b89f10fb67c4cd6a57437c8902be60c5311f70ecf29b619c0f69ca0c743705b8
MD5 e5ce64dcfae1f208fe318a7e10c78043
BLAKE2b-256 5770b115df1df625f92a9b18dc4ec9cbe1bef9c9d6e6e12092381abf2550b72c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 5ab4aee2d238041b026693406b64e2cd28bf431317b434d18dac44f61198614a
MD5 8da205d6f5e4475d8449a326b8162087
BLAKE2b-256 81cd2700dac41dc2db97401163778f69658d5de7b49878bf430f326a35780821

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