dtiesling / flask-muck

🧹 Flask REST framework for generating CRUD APIs and OpenAPI specs in the SQLAlchemy, Marshmallow/Pydantic application stack.
https://dtiesling.github.io/flask-muck/
MIT License
163 stars 7 forks source link

style: remove unnecessary f-strings #58

Closed pixeebot[bot] closed 9 months ago

pixeebot[bot] commented 9 months ago

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.

- var = f"hello"
+ var = "hello"
  ...
More reading * [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)

Powered by: pixeebot (codemod ID: pixee:python/remove-unnecessary-f-str)