PythonStringFormat is an extension for automated conversion between str.format and f-strings in Python.
This extension provides the following commands, available via Command Palette (Cmd + Shift + P
or Ctrl + Shift + P
):
- Convert f-string to .format(args): Convert a Python f-string to str.format with args.
- Convert f-string to .format(keywords): Convert a Python f-string to str.format with keywords (generic keywords are inserted).
- Convert .format() to f-string: Convert a str.format (can contain both args and kwargs) to f-string.
This extension requires Python extension.
You can install the PythonStringFormat extension directly from the Visual Studio Code Marketplace or by searching for it in the Extensions view (Cmd + Shift + X
, Ctrl + Shift + X
).
Currently, this extension has no settings.
Please report any issues on the official github repo.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or feedback, feel free to reach out on GitHub.