flake8-literal
Flake8 string literal validation
Decision gist · record as of 2026-08-14
Yes, if you want automated enforcement of string-literal style in flake8. The plugin is low-friction to install and has no known vulnerabilities. However, the 412-day gap since the last release and aging maintenance status suggest limited active development—consider whether the current feature set meets your needs and whether you're comfortable with slower response to issues or feature requests.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; flake8 must be installed and configured in your project.
- Low install friction with a single runtime dependency on flake8.
- Maintenance status is aging—last commit was 2025-06-28 and the package has not seen a release in 412 days, though the repository remains active and unarchived.
License · maintenance · safety
copyleft license (copyleft) — Licensed under GNU Lesser General Public License v3 (copyleft). Users must comply with LGPLv3+ terms; derivative works and modifications require the same license.
last release 2025-06-28 (412 days) · last repo commit 2025-06-28 · 5 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 308,085 downloads/mo, #7,770 on PyPI
Alternatives
Verify before relying
pip install flake8-literal
# Add to .flake8 config or command line:
# [flake8]
# literal-inline-quotes = single
# literal-docstring-quotes = double
# Then run flake8 as normal; the plugin checks automatically- Whether the 412-day gap since last release indicates active maintenance or dormancy despite recent commits.
- Whether the plugin correctly handles all edge cases in re.compile() detection across different import styles.
What it is and what it does
flake8-literal is a flake8 plugin that validates and enforces consistent styling of string literals in Python code. It checks inline strings, multiline strings, and docstrings, allowing you to configure whether each should use single or double quotes. The plugin also validates raw string usage, preventing unnecessary raw prefixes and requiring them when they avoid escaped backslashes—with special handling for regex patterns where raw strings are commonly used.
The plugin integrates directly into flake8's workflow and reports violations using error codes (LIT001–LIT016) that map to specific quote and raw-string issues. It offers fine-grained configuration options to customize quote preferences per string type and control raw string behavior, making it useful for teams that want to enforce a specific string-literal style across their codebase.
Use it for
- Enforce single quotes for inline strings and double quotes for docstrings across a team's Python codebase.
- Automatically detect and flag unnecessary raw string prefixes in code that doesn't actually contain escaped characters.
- Require raw strings in regex patterns to avoid escaped backslashes, while allowing them in other contexts.
- Catch inconsistent quote usage in continuation strings and suggest fixes to match the first string in the group.
- Prevent escaped quotes where using the opposite quote type would be clearer and more readable.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you want automated enforcement of string-literal style in flake8.
The plugin is low-friction to install and has no known vulnerabilities. However, the 412-day gap since the last release and aging maintenance status suggest limited active development—consider whether the current feature set meets your needs and whether you're comfortable with slower response to issues or feature requests.
Install
flake8-literal on PyPI
Before you install
Low install friction with a single runtime dependency on flake8. Maintenance status is aging—last commit was 2025-06-28 and the package has not seen a release in 412 days, though the repository remains active and unarchived.
Requires Python 3.12 or later; flake8 must be installed and configured in your project.
License in practice
Licensed under GNU Lesser General Public License v3 (copyleft). Users must comply with LGPLv3+ terms; derivative works and modifications require the same license.
Quickstart
pip install flake8-literal
# Add to .flake8 config or command line:
# [flake8]
# literal-inline-quotes = single
# literal-docstring-quotes = double
# Then run flake8 as normal; the plugin checks automatically
Verify before relying
- Whether the 412-day gap since last release indicates active maintenance or dormancy despite recent commits.
- Whether the plugin correctly handles all edge cases in re.compile() detection across different import styles.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflake8 |
| Maintenance | Aging 412 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 308,085 / month, #7,770 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_literal-1.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flake8 string literal validation”
- flake8-literalA flake8 plugin that enforces consistent styling of string literals,…
- flake8-no-implicit-concatA flake8 plugin that detects and forbids implicit string and bytes…
- flake8-implicit-str-concatA Flake8 plugin that detects and reports implicit string literal…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also flake8-quotes · pylint-quotes · flake8-copyright · flake8-fixme · flake8-no-implicit-concat · flake8-rst-docstrings · hacking · flake8-implicit-str-concat · flake8-logging-format · flake8-docstrings