--- id: flake8-plugin-utils version: "1.3.3" license: MIT license_treatment: permissive maintenance: dormant --- # flake8-plugin-utils — The package provides base classes and utils for flake8 plugin writing License: permissive · Maintenance: dormant · Downloads: 961.3K/mo ## What it is and what it does flake8-plugin-utils is a framework for building flake8 linter plugins. It provides base classes (Error, Visitor, Plugin) that abstract away boilerplate code needed to integrate with flake8's plugin system, letting you focus on the AST traversal logic. The package includes testing utilities (assert_error, assert_not_error) to validate your plugin rules, configuration support for parameterizing plugin behavior, and helper functions for common AST operations like checking node equivalence and identifying literal values. The package is designed for developers writing custom flake8 checkers. You define error types, implement visitor methods to detect violations, and the framework handles registration with flake8 and option parsing. It supports type-safe configuration through generics and includes utilities for comparing AST nodes, which is useful when your rules need to detect duplicate or equivalent code patterns. Use it for: - Build a custom flake8 plugin to enforce project-specific code style or naming conventions - Create a linter plugin that detects anti-patterns or problematic code structures in your codebase - Write a flake8 plugin that checks for security issues or compliance violations in Python code - Test your flake8 plugin rules with pytest using the built-in assert_error and assert_not_error helpers - Develop a plugin that requires configuration options, using the config system to parameterize checks ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides base classes and utilities for writing flake8 plugins, including Error, Visitor, and Plugin abstractions with built-in testing helpers and AST node utilities. Yes, if you are writing a flake8 plugin. The package significantly reduces boilerplate and provides a clean API for plugin development. Dormant maintenance is acceptable here because the API is stable and unlikely to need frequent updates; flake8's plugin interface changes rarely. No known vulnerabilities. Low install friction and permissive license add no friction. ## Install pip install flake8-plugin-utils uv add flake8-plugin-utils poetry add flake8-plugin-utils ## Installing flake8-plugin-utils Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2023-06-26 and no commits since 2024-01-01—but the package is stable and widely used (961264 monthly downloads). License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: from flake8_plugin_utils import Error, Visitor, Plugin class MyError(Error): code = 'X100' message = 'my error' class MyVisitor(Visitor): def visit_ClassDef(self, node): self.error_from_node(MyError, node) class MyPlugin(Plugin): name = 'MyPlugin' version = '0.1.0' visitors = [MyVisitor] Verify before relying: - Whether dormant maintenance status poses a risk for future Python or flake8 compatibility changes - Whether the package is actively maintained despite no recent commits ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 961.3K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 plugin development, flake8 plugin base classes, write flake8 plugins, flake8 plugin testing, flake8 visitor pattern, AST node utilities, flake8 plugin framework, flake8-plugin, ast-utilities, code-linting [View on SkillFed](https://skillfed.io/packages/flake8-plugin-utils) · [View on PyPI](https://pypi.org/project/flake8-plugin-utils/)