Skip to main content

A pygments lexer for pre-commit output.

Project description

Build Status Azure DevOps coverage Build Status

pygments-pre-commit

A pygments lexer for pre-commit output

See some demos! Or see it in action on pre-commit.com.

Installation

pip install pygments-pre-commit

Usage

This library provides a pygments lexer called pre-commit.

.. code-block:: pre-commit

    $ pre-commit run
    passing..................................................................Passed
    failing..................................................................Failed
    - hook id: failing
    - exit code: 1

    ['.pre-commit-config.yaml', 'a']

    skipped (no files)...................................(no files to check)Skipped
    skip me.................................................................Skipped

This library also provides a sphinx extension. It can be enabled by adding 'pygments_pre_commit' to the extensions setting in your conf.py.

The colors can be tweaked using the sphinx setting (in conf.py) pygments_pre_commit_ansi_colors:

pygments_pre_commit_ansi_colors = {
    'Black': '#2e3436',
    'Cyan': '#06989a',
    'Green': '#4e9a06',
    'Red': '#c00',
    'Yellow': '#c4A000',
    'Faint': '#ccc',
}

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

pygments_pre_commit-2.2.0.tar.gz (3.8 kB view hashes)

Uploaded source

Built Distribution

pygments_pre_commit-2.2.0-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page