Skip to main content

Find and replace unneeded f-strings in your code.

Project description

rm_unneeded_f_str

Find and replace unneeded f-strings in your code.

Installation

pip install rm_unneeded_f_str

Usage

Run via the CLI on a file or folder:

  • rm-unneeded-f-str path/to/file.py
  • rm-unneeded-f-str path/to/folder/

Or use as a pre-commit hook:

-   repo: https://github.com/dannysepler/rm_unneeded_f_str
    rev: v0.0.4
    hooks:
    -   id: rm_unneeded_f_str

Will replace

-f'hello world'
+'hello world'
-f'''hello world'''
+'''hello world'''
-f'''hello
-world'''
+f'''hello
+world'''

Will not replace

f'hello {world}'
f'''hello
{world}'''

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

rm_unneeded_f_str-0.0.5.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

rm_unneeded_f_str-0.0.5-py2.py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 2 Python 3

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