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.1.0
hooks:
- id: rm-unneeded-f-str
Will replace
-f'hello world'
+'hello world'
-f'''hello world'''
+'''hello world'''
-rf'hello world'
+r'hello world'
-f'''hello
-world'''
+f'''hello
+world'''
Will not replace
f'hello {world}'
f'''hello
{world}'''
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 Distribution
Close
Hashes for rm_unneeded_f_str-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 067e79d4c5add78128bf09aab952ef667ec8ad4d61768ae25979159b18a0491e |
|
MD5 | e774eddc4ed4f76c8a1aaad2f5dbce0a |
|
BLAKE2b-256 | 785b6e5fdee5ec2b9da5f79b3057434a35571fc70144ff1d7eb322d3d3d00b14 |