--- id: flake8-pep585 version: "0.1.7" license: MPL-2.0 license_treatment: copyleft maintenance: abandoned --- # flake8-pep585 — flake8 plugin to enforce new-style type hints (PEP 585) License: copyleft · Maintenance: abandoned · Downloads: 98.7K/mo ## What it is and what it does flake8-pep585 is a linter plugin that integrates with flake8 to catch deprecated type imports from the `typing` module. PEP 585 introduced the ability to use standard library classes directly for type annotations—for example, `list[int]` instead of `typing.List[int]`, or `collections.abc.Callable` instead of `typing.Callable`. The plugin scans your code for these deprecated imports and reports them with specific error codes and suggestions for the modern equivalent. The plugin works on Python 3.7 through 3.9 and can be configured to always enforce the rules, automatically detect them (based on the presence of `from __future__ import annotations`), or never enforce them. You can also whitelist specific symbols if you have a reason to keep using the older imports. Since it has no runtime dependencies beyond flake8 itself, installation is straightforward. Use it for: - Modernize a codebase to use PEP 585 type hints when upgrading to Python 3.9+. - Enforce team standards in CI/CD pipelines to prevent deprecated typing imports in new code. - Discover and fix deprecated type imports that IDEs' auto-import features may have suggested. - Gradually migrate a project to modern type annotations without manual code review. - Validate that a project is ready for future Python versions where old typing imports may be removed. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A flake8 plugin that detects and flags deprecated type imports from the `typing` module that should be replaced with standard library equivalents under PEP 585. Yes, if you are actively maintaining code on Python 3.9+ and want to enforce PEP 585 compliance. The plugin is straightforward to set up and has no runtime overhead. However, note that the project is abandoned (last release February 2023) and may not be updated for future flake8 or Python releases, so verify compatibility with your current toolchain before relying on it long-term. ## Install pip install flake8-pep585 uv add flake8-pep585 poetry add flake8-pep585 ## Installing flake8-pep585 Before you install: Low install friction; no runtime dependencies. Maintenance is abandoned—last release was 2023-02-26, over a year ago. The repository is not archived, but no active development is expected. License in practice: Licensed under MPL-2.0 (copyleft). You may use and modify the plugin freely, but any modifications must be distributed under the same license if shared. Quickstart: pip install flake8-pep585 # Then run flake8 on your code: flake8 your_project/ # Or configure via setup.cfg: # [flake8] # pep585-activation = always Requires flake8 to be installed separately. Only enforces PEP 585 rules on Python 3.7–3.9; behavior on 3.7–3.8 depends on presence of `from __future__ import annotations`. Verify before relying: - Whether the plugin correctly handles all PEP 585 replacements or if there are edge cases not covered. - Whether the abandoned status means the plugin may break with future Python or flake8 releases. ## Package facts - License: MPL-2.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 98.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 pep 585 plugin, deprecated typing imports, type hint modernization, pep 585 enforcement, typing module deprecation checker, standard library type hints, modern python type annotations, type-hints, code-quality, linting [View on SkillFed](https://skillfed.io/packages/flake8-pep585) · [View on PyPI](https://pypi.org/project/flake8-pep585/)