{"id":23097,"library":"flynt","title":"flynt","description":"A CLI tool to automatically convert a Python project's %-formatted strings (like '%s' % var) and .format() calls to f-strings. Current version 1.0.6, stable, low release cadence. Requires Python >=3.9.","status":"active","version":"1.0.6","language":"python","source_language":"en","source_url":"https://github.com/ikamensh/flynt","tags":["f-string","string-formatting","conversion","cli","code-quality","Python3"],"install":[{"cmd":"pip install flynt","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"flynt is a module, not a function. Use as a CLI tool.","wrong":"from flynt import flynt","symbol":"flynt","correct":"import flynt"}],"quickstart":{"code":"import flynt\n# flynt is a CLI tool; to run programmatically:\nfrom flynt import fstringify\nfstringify('\"%s\" % \"hello\"')\n","lang":"python","description":"Basic usage: convert a single string literal to f-string."},"warnings":[{"fix":"Ensure the strings you want to convert are explicit string literals in the source code.","message":"flynt only works on literal string expressions, not on strings stored in variables or computed at runtime. It cannot convert %-formatting inside non-literal strings.","severity":"gotcha","affected_versions":"all"},{"fix":"Always run with --dry-run first to preview changes: flynt --dry-run <file_or_dir>","message":"flynt will modify files in-place by default. Without --dry-run, it overwrites source files, which can lead to loss of original formatting.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.9+ or pin flynt to <1.0.6 if Python 3.8 is required.","message":"flynt 1.0.6 drops Python 3.8 support; requires Python >=3.9.","severity":"breaking","affected_versions":">=1.0.6"},{"fix":"Run tests after conversion. Use --verbose to inspect changed files.","message":"flynt may introduce syntax errors if the original string contains complex nested expressions or escaped quotes. Always verify the output.","severity":"gotcha","affected_versions":"all"},{"fix":"Remove --line-length from command line if used.","message":"The --line-length option was removed in an earlier version; there is no replacement.","severity":"deprecated","affected_versions":">=0.7"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Remove --line-length from your command; flynt no longer supports line length control.","cause":"The --line-length option was removed in a previous version.","error":"flynt: error: unrecognized arguments: --line-length 80"},{"fix":"Check the API docs; use the correct argument name, e.g., 'multiline' instead.","cause":"The argument was renamed or removed in a newer version of flynt.","error":"TypeError: fstringify() got an unexpected keyword argument 'transform_multiline_fstrings'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}