Freed-Wu / astyle-wheel

This project packages the astyle utility as a Python package.
https://pypi.org/project/astyle/
GNU General Public License v3.0
3 stars 0 forks source link
astyle formatter pre-commit-hook

Astyle Python distribution

pre-commit.ci status github/workflow

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

pypi/status pypi/v pypi/downloads pypi/format pypi/implementation pypi/pyversions

This project packages the astyle utility as a Python package.

Install

pip install astyle

Installing is not needed for pre-commit.

Usage

shell

astyle --help
# or
python -m astyle --help

python

from astyle.__main__ import main

main("--help")

Or:

from astyle import astyle

astyle("  #include <Python.h>", "indent-classes")

pre-commit

.pre-commit-config.yaml:

repos:
  - repo: https://github.com/Freed-Wu/mirrors-astyle
    rev: 3.6.4
    hooks:
      - id: astyle
pre-commit install
git commit

Please use https://github.com/Freed-Wu/mirrors-astyle, it uses binary wheel and will be faster than this repository which uses source code.

Similar Projects

pre-commit hooks

Python distributions