Registry / testing / fprettify

fprettify

JSON →
library0.3.7pypypiunverified

fprettify is an auto-formatter for modern Fortran source code. It automatically indents code, aligns statements, and supports Fortran 2003/2008 features. The current version is 0.3.7, released with Python 3 support only (dropped Python 2). Release cadence is irregular; latest release in 2021.

pip install fprettify
INSTALL
IMPORT
SIG · FPRETTIFY
F
fprettify
testingpythonv0.3.7
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fprettify
from fprettify import fprettify
import fprettify
The main formatter class is inside the fprettify module; direct import of the package doesn't expose the class.

Basic usage: import the FortranFormatter class, then call format_file or format_directory.

from fprettify import fprettify formatter = fprettify.FortranFormatter() # Format a single file formatter.format_file('source.f90') # Or format a directory recursively formatter.format_directory('.')
fprettify --version
Debug
Known issues
breakingPython 2 support was dropped in v0.3.7. If you are on Python 2, you must use an older version.
fix
Use Python 3 or pin to fprettify==0.3.6 if Python 2 is required.
affects: < 0.3.7
gotchaBy default, fprettify overwrites files in place. There is no backup unless you use version control.
fix
Use the --diff flag (CLI) or check the diff before committing. In code, copy files beforehand.
affects: all
gotchaOptional dependency configargparse is required for config file support. Without it, --config-file fails silently or errors.
fix
Install fprettify with extras: pip install fprettify[config]
affects: >=0.3.4
Upgrade
Version history
0.3.7latest on PyPI · released Nov 20, 2020
Audit
Dependencies
configargparseoptionalOptional dependency for config file support (via --config-file)
Agent activity
4 hits · last 30 days
node
4
Resources
fprettify — pip install fprettify · libregistry