Python wrapper around invoking shfmt (https://github.com/mvdan/sh)
Project description
shfmt-py
Python-installable wrapper for shfmt, the shell script formatter.
Internally this package downloads the pre-built shfmt binary for your platform at install time.
Modeled after shellcheck-py, adapted for shfmt.
Installation
pip install shfmt-py
Usage
CLI
After installation, the shfmt binary is available on your PATH (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.13.0.1
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shfmt_py-3.13.0.2.tar.gz.
File metadata
- Download URL: shfmt_py-3.13.0.2.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
793dd29c88e39369b05bb9f8a4de51b8d4822f564c3af98978ccf42918998ecb
|
|
| MD5 |
a9fabbbc27eb0d84abfd812eb09a5893
|
|
| BLAKE2b-256 |
9a0e0bc9fdd6d45e2115a7dced855acf26758c4cfd9841c95430f24fa2c13bb9
|
File details
Details for the file shfmt_py-3.13.0.2-py2.py3-none-win_amd64.whl.
File metadata
- Download URL: shfmt_py-3.13.0.2-py2.py3-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 2, Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82fb0e94a0e3fc240add3d81ca127f6621abfe0dcb9deb91f8015001ddf5b579
|
|
| MD5 |
efa469fef5d12a1e440487978abfe237
|
|
| BLAKE2b-256 |
72a205ffe8374848ac38c7339ff9dcee1009c16f5d7aace6d0bfa3d024df21ca
|
File details
Details for the file shfmt_py-3.13.0.2-py2.py3-none-manylinux2014_x86_64.whl.
File metadata
- Download URL: shfmt_py-3.13.0.2-py2.py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bf4c8268f8907061b36d786c0bbeb8f465feb227c7de9d660abdd7d2a0b1f57
|
|
| MD5 |
534e6303f92aedd62e042b0c74e9a972
|
|
| BLAKE2b-256 |
c454f296ab316f367a39101813bdae90ea8ac3b698b92aa84eb290f44b23f297
|
File details
Details for the file shfmt_py-3.13.0.2-py2.py3-none-manylinux2014_aarch64.whl.
File metadata
- Download URL: shfmt_py-3.13.0.2-py2.py3-none-manylinux2014_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07fdfe694a30465398caade3cfa25613da1a0c13d4f0b3f723a9e287b58147ba
|
|
| MD5 |
6ee6b0aeb6978f3cae6b721db19364d4
|
|
| BLAKE2b-256 |
2bc40890822a1f1dd5b7ed9ee2be6487010df5c0e7c6088e9002668b0eeaa4ab
|
File details
Details for the file shfmt_py-3.13.0.2-py2.py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: shfmt_py-3.13.0.2-py2.py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 2, Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70fca701c3da0452c762658b0972bc46f43dfea6d00aa1f0b79eda22175d898c
|
|
| MD5 |
cfbdf22d6c785d692bdf4d95272cdf19
|
|
| BLAKE2b-256 |
9bc7c2a8f6390769cab277a4fb5860abc0c1bb9b172718814718648b432ca365
|
File details
Details for the file shfmt_py-3.13.0.2-py2.py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: shfmt_py-3.13.0.2-py2.py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 2, Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1857705ee30a7c967f3cc8fe1c7c0723a809ace16b0b0f0410ff0bfddeafcab
|
|
| MD5 |
b4f9935198c81871ae977f2db968b8c1
|
|
| BLAKE2b-256 |
aa196d5d03795d2c63d45a3d6567767a1387d1739da0c96e322a648a8fa96c07
|