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.2.0
hooks:
- id: rm-unneeded-f-str
Will replace
-f'hello'
+'hello'
-f'''hello'''
+'''hello'''
-rf'hello'
+r'hello'
-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.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8fcc0addd6a696223dcddfcfb5b61126c0623242f7103d5d565e301f77cf0fe |
|
MD5 | b573a6925c5f29bdee3b68a2f2e53763 |
|
BLAKE2b-256 | 0bfd43ec4251455fed7059b8bc208852c9e9415367c6f87e2ecc35c434e032c7 |