Skip to main content

fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.

Project description

fstring_to_format

PyPI version PyPI pyversions Python package codecov Codacy Badge PyPI download month PyPI download week PyPI download day GitHub all releases GitHub contributors CodeFactor Codacy Badge PyPI license

fstring_to_format converts Python f-string expressions to .format() for backwards compatibility.

There are other packages for this too, but this is a regular expression based cleaner solution.

Installation

Use the package manager pip to install fstring_to_format.

$ pip install fstring_to_format

# to make sure you have the latest version
$ pip install -U fstring_to_format

# latest available code base
$ pip install -U git+https://github.com/eftalgezer/fstring_to_format.git

Usage

$ python -m fstring_to_format filename.py # for a single file
$ python -m fstring_to_format *.py # for all Python files in a directory

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU General Public License v3.0

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

fstring_to_format-0.1.2.tar.gz (15.9 kB view hashes)

Uploaded Source

Built Distributions

fstring_to_format-0.1.2-py3.10.egg (6.1 kB view hashes)

Uploaded Source

fstring_to_format-0.1.2-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

fstring_to_format-0.1.2-py2.7.egg (5.9 kB view hashes)

Uploaded Source

fstring_to_format-0.1.2-py2-none-any.whl (16.4 kB view hashes)

Uploaded Python 2

Supported by

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