$npx skillfedfor your agent

flake8-tidy-imports

A flake8 plugin that helps you write tidier imports.

Worth itPyPI Quality AssuranceReleased Sep 2025461.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flake8_tidy_imports-4.12.0-py3-none-any.whl
v4.12.0 · released 2025-09-08 · Python >=3.9 · 1 runtime deps: flake8

Yes. The plugin is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and installs with minimal friction (one dependency). It solves a real problem—enforcing import discipline—and integrates seamlessly into existing flake8 workflows. Recommended for any project using flake8 that wants to enforce import policies.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • If you define flake8's `select` setting, you must add the `I25` prefix to activate the plugin's rules.
  • Low friction: pure Python wheel with only flake8 as a runtime dependency.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

last release 2025-09-08 (340 days) · last repo commit 2026-08-13 · 74 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 461,480 downloads/mo, #6,533 on PyPI

Verify before relying

pip install flake8-tidy-imports

# In setup.cfg or .flake8:
[flake8]
banned-modules =
  mock = Use unittest.mock.

# Then run flake8 as normal:
flake8 your_code.py
  • Whether the suggested rewrites for I250 (unnecessary aliases) are always syntactically correct in all edge cases.
  • Performance impact when checking large codebases with many banned-modules entries or wildcard patterns.
Same gist for agents: .md · .json

What it is and what it does

flake8-tidy-imports is a flake8 plugin that enforces import hygiene by detecting three categories of import issues: unnecessary aliases (I250), banned imports (I251), and relative imports (I252). It integrates directly into flake8's linting workflow and reports violations with configurable messages. The plugin is configured via flake8's standard config files and allows you to define which imports should be banned, whether relative imports are allowed, and what messages to show when violations occur.

The plugin supports wildcard patterns in banned-modules, a special {python2to3} directive to ban Python 2 modules with suggested replacements, and fine-grained control over relative imports. It has been actively maintained since 2016 and is classified as Production/Stable with support for Python 3.9 to 3.14.

Use it for

  • Enforce a project-wide ban on deprecated modules and suggest modern replacements during code review.
  • Prevent accidental use of relative imports in a codebase that requires absolute imports for clarity.
  • Automatically flag unnecessary import aliases during linting to keep imports clean.
  • Configure wildcard bans on entire module hierarchies to guide developers away from old code.
  • Integrate import style enforcement into CI/CD pipelines via flake8 without additional tools.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The plugin is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and installs with minimal friction (one dependency). It solves a real problem—enforcing import discipline—and integrates seamlessly into existing flake8 workflows. Recommended for any project using flake8 that wants to enforce import policies.

Install

flake8-tidy-imports on PyPI

Before you install

Low friction: pure Python wheel with only flake8 as a runtime dependency. Actively maintained with last commit 2026-08-13 and latest release 2025-09-08. Supports Python 3.9 to 3.14.

Requires Python 3.9 or later. If you define flake8's `select` setting, you must add the `I25` prefix to activate the plugin's rules.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install flake8-tidy-imports

# In setup.cfg or .flake8:
[flake8]
banned-modules =
  mock = Use unittest.mock.

# Then run flake8 as normal:
flake8 your_code.py

Verify before relying

  • Whether the suggested rewrites for I250 (unnecessary aliases) are always syntactically correct in all edge cases.
  • Performance impact when checking large codebases with many banned-modules entries or wildcard patterns.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
flake8
MaintenanceActively maintained 340 days since the last release
Last repo commit
First released
Downloads461,480 / month, #6,533 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: Flake8Intended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Typing :: Typed

Evidence: flake8_tidy_imports-4.12.0-py3-none-any.whl

Tags

Capabilities
flake8 import lintingdetect unnecessary import aliasesban imports by configurationrelative import checkerimport style enforcementflake8 plugin for importstidy import rules
Topics
lintingimport-hygienecode-quality
PyPI keywords
flake8_tidy_imports

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 › “detect unnecessary import aliases”

  • flake8-tidy-importsA flake8 plugin that detects and reports unnecessary import aliases,…
  • fawltydepsFawltydeps identifies undeclared dependencies (imports without…
  • pyan3Pyan3 performs static analysis on Python source code to generate call…

Give your agent the search over MCP, or paste the wish link into any chat.

More Quality Assurance packages

coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
ruff Worth it
PyPI · Python Modules · released Aug 2026

Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.

MITcompiled wheel · 3.7+
316.1Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
black Worth it
PyPI · Python Modules · released May 2026

Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.

MITpure Python · 3.10+
179.9Mdownloads / mo
pytest-xdist Worth it
PyPI · Utilities · released Jul 2025

pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.

Install it if your test suite takes long enough that parallelization would save meaningful time.

MITpure Python · 3.9+
177.1Mdownloads / mo
cfn-lint Worth it
PyPI · Quality Assurance · released Aug 2026

Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.

Install it if you work with CloudFormation templates.

MIT-0pure Python
114.9Mdownloads / mo

See also flake8-import-order · flake8-isort · flake8-type-checking · flake8-requirements · flake8-pep585 · flake8-comprehensions · flake8-typing-imports · absolufy-imports · flake8-pie · flake8-use-pathlib