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.3.tar.gz (3.4 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.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_copilot_docs_hook-0.1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for python_copilot_docs_hook-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e396cfde3ffaf5c560202fada0cdfb68fd7388314b471c09914427399cda8e55
MD5 99c9923a9c53e2fd03abb28e8e1cb245
BLAKE2b-256 771d5daf619b0f7c7a01ac589e553253edbf9c0e650f4abd37d0e86cb1d6f9bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_copilot_docs_hook-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 80714dd6369743d822cc5e3ec4e1614c2788dc8e7248de13d38ff1dc5c4bc826
MD5 c6be9fd661c502f7fb1955537c05303a
BLAKE2b-256 0b8e3efab89ba7e0b3f4c4bbaf2ca60f121453efd8dd317e6eb209e7c6033934

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