forformat
forformat formats free-form Fortran source files. It provides findent-compatible indentation,
plus an optional full-format mode for selected lexical normalization and wrapping.
The package installs the forformat command. It requires Python 3.9 or newer and does not provide
an importable Python formatting API.
Install
python -m pip install forformat
Use
Format one or more Fortran files in place:
forformat src/module.f90
forformat src/*.f90
Use standard input and output in a pipeline:
forformat --stdin < src/module.f90 > /tmp/module.f90
forformat --stdout src/module.f90 > /tmp/module.f90
Use --check in CI to fail when files need formatting, or --diff to print unified diffs:
forformat --check src/*.f90
forformat --diff src/*.f90
Project context
When you pass explicit paths, forformat scans the current Git checkout for free-form Fortran
sources and uses declarations from those files to resolve names while formatting. Only the paths
you pass are changed. This project-aware behavior is useful when a declaration in one module
controls the spelling or formatting of code in another file.
For independent file processing, use --isolated with explicit paths:
forformat --isolated src/module.f90
forformat --isolated --stdout src/module.f90 > /tmp/module.f90
Input from standard input is also processed without a repository scan:
forformat --stdin < src/module.f90 > /tmp/module.f90
Example profile
This profile mirrors the indentation settings used by CAMB. The final
--indent-contains=restart setting is intentional; options may be written with hyphens or
underscores.
forformat \
--full \
--indent=4 \
--indent-module=0 \
--indent-procedure=0 \
--start-indent=4 \
--indent-contains=0 \
--openmp=0 \
--indent-contains=restart \
--indent-select=4 \
--indent-case=4 \
--indent-interface=0 \
--indent-continuation=4 \
--indent-ampersand \
src/*.f90
The default is --full. Use --indent-only for findent-compatible indentation and trailing
whitespace handling. Run forformat --help for all options. Fixed-form Fortran and automatic
format detection are not supported.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 forformat-0.1.0-py3-none-win_amd64.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-win_amd64.whl
- Upload date:
- Size: 360.5 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c0f4c7b20ffba39d7e71ea1fa852938394e565c597df989b98a46fbf1aca75
|
|
| MD5 |
d8cacd93d899b1f1eb97c132ef3c0f1c
|
|
| BLAKE2b-256 |
ab9105b17685f72f8d93818efea61ac108207811b70b9e340175acb6f009444f
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-win_amd64.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-win_amd64.whl -
Subject digest:
78c0f4c7b20ffba39d7e71ea1fa852938394e565c597df989b98a46fbf1aca75 - Sigstore transparency entry: 2462151570
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ec022650174774ebb3f87b656183232781217833 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ec022650174774ebb3f87b656183232781217833 -
Trigger Event:
push
-
Statement type:
File details
Details for the file forformat-0.1.0-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl
- Upload date:
- Size: 498.6 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c39e8e93a787e2734d1e85bc0ccb4b38e1345265fddabc6b83304f3bfd4b73a
|
|
| MD5 |
34aa0f545a0a1f142500a1a70568c3e7
|
|
| BLAKE2b-256 |
e5ad1d38cc00eeed43591d0b7dd63d3fbfb32d2543c6743d4223af21993f1480
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl -
Subject digest:
8c39e8e93a787e2734d1e85bc0ccb4b38e1345265fddabc6b83304f3bfd4b73a - Sigstore transparency entry: 2462151455
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ec022650174774ebb3f87b656183232781217833 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ec022650174774ebb3f87b656183232781217833 -
Trigger Event:
push
-
Statement type:
File details
Details for the file forformat-0.1.0-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl
- Upload date:
- Size: 463.0 kB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87957a362a65cfc5e67d5f4fa82f998f4b7a3309522d485c4c49b63da32b0628
|
|
| MD5 |
4270fc9bbc0da7958a14858287fbaa5d
|
|
| BLAKE2b-256 |
b4fb8fff22cb644ee7b488f980d9dcc409539d709c95621426378ea318e10b9f
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl -
Subject digest:
87957a362a65cfc5e67d5f4fa82f998f4b7a3309522d485c4c49b63da32b0628 - Sigstore transparency entry: 2462151386
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ec022650174774ebb3f87b656183232781217833 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ec022650174774ebb3f87b656183232781217833 -
Trigger Event:
push
-
Statement type:
File details
Details for the file forformat-0.1.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 495.8 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e46d54532901b22af742f9b619879d57028961999e9854a7403b1fb49d408184
|
|
| MD5 |
c2900ead133e25362eb9cd92cb528f1f
|
|
| BLAKE2b-256 |
1c4150e62227602f13a28be3c1b5bf18404648d1269bdeb9a37356303c0ffd8e
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
e46d54532901b22af742f9b619879d57028961999e9854a7403b1fb49d408184 - Sigstore transparency entry: 2466658256
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ab199e6f8cb6a2dfb72ba2a91846cdf70a2269ac -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ab199e6f8cb6a2dfb72ba2a91846cdf70a2269ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file forformat-0.1.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 535.1 kB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ea2f0236384a617f8e8c23b87d8c61687658989705d4458726546bc8cb2aa3
|
|
| MD5 |
d07a87dd8f08c7484a44830358dbc6fc
|
|
| BLAKE2b-256 |
8376f023e37a7787174b8dcae2a0fd0f419daa682291e79296502c262ac37887
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-macosx_10_12_x86_64.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
c9ea2f0236384a617f8e8c23b87d8c61687658989705d4458726546bc8cb2aa3 - Sigstore transparency entry: 2466658297
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ab199e6f8cb6a2dfb72ba2a91846cdf70a2269ac -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ab199e6f8cb6a2dfb72ba2a91846cdf70a2269ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file forformat-0.1.0-py3-none-macosx_10_9_universal2.whl.
File metadata
- Download URL: forformat-0.1.0-py3-none-macosx_10_9_universal2.whl
- Upload date:
- Size: 416.9 kB
- Tags: Python 3, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d9cb1520912f595661b64795a6fd9241caff7f1dfd7a40850a7fb659c4b0d5
|
|
| MD5 |
201b7f3b3e0fd1aa2b85d107112fe2fd
|
|
| BLAKE2b-256 |
b8baef3abd93ff2df4d3d1257f4ac635d341d4c89e948500da15141e34693270
|
Provenance
The following attestation bundles were made for forformat-0.1.0-py3-none-macosx_10_9_universal2.whl:
Publisher:
pypi.yml on cmbant/forformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forformat-0.1.0-py3-none-macosx_10_9_universal2.whl -
Subject digest:
75d9cb1520912f595661b64795a6fd9241caff7f1dfd7a40850a7fb659c4b0d5 - Sigstore transparency entry: 2462151495
- Sigstore integration time:
-
Permalink:
cmbant/forformat@ec022650174774ebb3f87b656183232781217833 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cmbant
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@ec022650174774ebb3f87b656183232781217833 -
Trigger Event:
push
-
Statement type: