{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/18"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/9"}],"enrichment":{"capability":"Flynt is a command-line tool that automatically converts Python string formatting from %-style and .format() syntax to f-strings, modernizing codebases to Python 3.6+ syntax.","skillfed_tags":["code-modernization","refactoring-tool","cli"],"use_cases":["Modernize a legacy Python codebase by converting all string formatting to f-strings in a single automated pass.","Enforce f-string usage in a project via a pre-commit hook to ensure consistent formatting style across all commits.","Dry-run conversion on a project to review what changes would be made before applying them to version control.","Integrate into a CI/CD pipeline as a linting check to fail builds if non-f-string formatting is detected.","Convert string concatenations or static joins to f-strings when using Python 3.9+ with the --transform-concats or --transform-joins flags."],"what_it_does":"Flynt is a command-line refactoring tool that scans Python source files and automatically rewrites string formatting expressions into f-strings. It processes %-style formatting (e.g., `'%s' % var`) and .format() calls (e.g., `'{}'.format(var)`) into their f-string equivalents (e.g., `f'{var}'`), modernizing code to use Python 3.6+ syntax. The tool can operate on single files or recursively traverse directories, skipping common non-source folders like venv and site-packages.\n\nFlynt is designed as a safe, automated refactoring pass for existing projects. It offers dry-run and linting modes, configuration via pyproject.toml, and integration with pre-commit hooks. The tool depends only on tomli for configuration parsing and uses Python's built-in ast module for code transformation. While it handles the vast majority of formatting conversions, the fact sheet documents a known edge case where single-element tuples format differently under f-strings, and some format specifiers (like %d with floats) may raise different exceptions than before.","worth_installing":"Yes. Flynt is a low-friction, actively maintained tool with no security vulnerabilities, permissive licensing, and a clear, single purpose: automating string formatting modernization. It's well-suited for teams wanting to standardize on f-strings or for one-time codebase refactoring. The documented edge cases (tuple formatting, format specifier differences) are manageable with adequate test coverage and are not blockers for most projects."},"id":"flynt","links":{"html":"https://skillfed.io/packages/flynt","md":"https://skillfed.io/packages/flynt.md","pypi":"https://pypi.org/project/flynt/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-29","license_spdx":null,"license_treatment":"permissive","name":"flynt","python_support":"supports_current","summary":"CLI tool to convert a python project's %-formatted strings to f-strings."},"popularity":{"monthly_downloads":134527,"position":11472,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.6"}
