Skip to main content

Python wrapper around invoking shfmt (https://github.com/mvdan/sh)

Project description

pre-commit.ci status

shfmt-py

A python wrapper to provide a pip-installable shfmt binary.

Internally this package provides a convenient way to download the pre-built shellcheck binary for your particular platform.

This package is totally cloned from shellcheck-py and modified to provide shfmt instead.

Installation

pip install shfmt-py

Usage

CLI

After installation, the shfmt binary should be available in your environment (or shfmt.exe on windows).

As pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

- repo: https://github.com/maxwinterstein/shfmt-py
  rev: v3.11.0.2
  hooks:
    - id: shfmt

FAQ

Q: It won't get updated via e.g. Renovate Bot

A: See https://github.com/shfmt-py/update-via-renovate .

Q: I get something like SSL: CERTIFICATE_VERIFY_FAILED on macOS

A: Install certificates with e.g.: "/Applications/Python 3.9/Install Certificates.command". See here or here for a solution.

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

shfmt_py-3.11.0.2.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file shfmt_py-3.11.0.2.tar.gz.

File metadata

  • Download URL: shfmt_py-3.11.0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for shfmt_py-3.11.0.2.tar.gz
Algorithm Hash digest
SHA256 ab84e5e3f5fedfdf93b758ba573342cdd3af1c99ebae81a1012e3b8dfb9622d3
MD5 863c85169fb0852c4cc75f1c155fcbbd
BLAKE2b-256 fb11b668de6487497db8a4c4b3834cda5f8699805e9965ac7d63c038027f11d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page