Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*Issue #, if available:* N/A *Description of changes:* This codemod converts any f-strings without interpolated variables into regular strings. In these cases the use of f-string is not necessary; a simple string literal is sufficient. While in some (extreme) cases we might expect a very modest performance improvement, in general this is a fix that improves the overall cleanliness and quality of your code. ```diff - var = f"hello" + var = "hello" ... ``` <details> <summary>More reading</summary> * [https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/f-string-without-interpolation.html](https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/f-string-without-interpolation.html) * [https://github.com/Instagram/LibCST/blob/main/libcst/codemod/commands/unnecessary_format_string.py](https://github.com/Instagram/LibCST/blob/main/libcst/codemod/commands/unnecessary_format_string.py) </details> Powered by: [pixeebot](https://docs.pixee.ai/) (codemod ID: [pixee:python/remove-unnecessary-f-str](https://docs.pixee.ai/codemods/python/pixee_python_remove-unnecessary-f-str)) ![](https://d1zaessa2hpsmj.cloudfront.net/pixel/v1/track?writeKey=2PI43jNm7atYvAuK7rJUz3Kcd6A&event=DRIP_PR%7CPixee-Bot-Python%2Fchronos-forecasting%7C0822cf23d3ea7d0de7d1b3685ba6e93f9e17ca0d) <!--{"type":"DRIP","codemod":"pixee:python/remove-unnecessary-f-str"}--> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
- Loading branch information