--- id: flake8-use-fstring version: "1.4" license: unclear license_treatment: permissive maintenance: dormant --- # flake8-use-fstring — Flake8 plugin for string formatting style. License: permissive · Maintenance: dormant · Downloads: 425.3K/mo ## What it is and what it does flake8-use-fstring is a flake8 linter plugin that flags instances of % formatting and .format() method calls in Python code, pushing developers toward f-strings. It reports three error codes: FS001 for % formatting, FS002 for .format usage, and FS003 (disabled by default) for strings that look like they should be f-strings but lack the f prefix. The plugin works by scanning logical lines and checking whether the value before % or .format is a string literal, with configurable greedy levels (0–2) to control sensitivity and reduce false positives. The plugin integrates directly into flake8's workflow and requires no runtime dependencies. It supports Python 3.6 and later, matching the version f-strings were introduced. Configuration is done via command-line flags or a .flake8 config file. The main trade-off is that without type information, the plugin cannot always determine whether a value is truly a string, so higher greedy levels may report false positives on non-string values. Use it for: - Enforce f-string adoption across a codebase during a Python modernization effort. - Catch legacy string formatting in code reviews as part of a flake8 linting pipeline. - Configure FS003 to flag strings with {} that are missing the f prefix, catching incomplete f-string migrations. - Use greedy level 0 (default) in strict projects where only obvious string literals should trigger warnings. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A flake8 plugin that detects and flags old-style string formatting (% and .format) to encourage migration to f-strings in Python code. Yes, if you are actively modernizing a codebase to f-strings and already use flake8. The plugin is lightweight, has no dependencies, and integrates seamlessly. However, maintenance is dormant (last release 1479 days ago), so compatibility with very recent flake8 versions is uncertain—verify it works with your flake8 version before relying on it in CI/CD. For new projects, consider whether a more actively maintained linter rule might be preferable. ## Install pip install flake8-use-fstring uv add flake8-use-fstring poetry add flake8-use-fstring ## Installing flake8-use-fstring Before you install: High install friction due to being a flake8 plugin with no runtime dependencies but requiring integration into an existing flake8 setup. Last release was 1479 days ago; repository is dormant but not archived, so maintenance is stalled. License in practice: Licensed under MIT (permissive), so no restrictions on use or modification in commercial or private projects. Quickstart: pip install flake8-use-fstring # Then run flake8 as normal; the plugin auto-registers flake8 myfile.py # Configure in .flake8: # [flake8] # percent-greedy = 0 # format-greedy = 0 Requires Python >= 3.6 and an existing flake8 installation; the plugin only works as a flake8 extension, not standalone. Verify before relying: - Whether the plugin remains compatible with recent flake8 versions given the dormant maintenance status. - Real-world false-positive rate at greedy levels 1 and 2 beyond the documented examples. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: high - Maintenance: dormant - Downloads: 425.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 f-string enforcement, detect percent formatting, enforce modern string formatting, flake8 format method checker, python f-string linter, linter-plugin, code-style, modernization [View on SkillFed](https://skillfed.io/packages/flake8-use-fstring) · [View on PyPI](https://pypi.org/project/flake8-use-fstring/)