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
File details
Details for the file rm_unneeded_f_str-0.2.0.tar.gz
.
File metadata
- Download URL: rm_unneeded_f_str-0.2.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da1f61f92a224fe90a256dd49e53ee90e799103826b8f38f56e0852a2eba92c |
|
MD5 | dc4a69231ba5144cb4c901a8f57bf134 |
|
BLAKE2b-256 | 971a77fc3f8f80f891f6cea1dface8cf49566dfc8990044eb8cfa7069cbdb411 |
File details
Details for the file rm_unneeded_f_str-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: rm_unneeded_f_str-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8fcc0addd6a696223dcddfcfb5b61126c0623242f7103d5d565e301f77cf0fe |
|
MD5 | b573a6925c5f29bdee3b68a2f2e53763 |
|
BLAKE2b-256 | 0bfd43ec4251455fed7059b8bc208852c9e9415367c6f87e2ecc35c434e032c7 |