--- id: flake8-use-pathlib version: "0.3.0" license: MIT license_treatment: permissive maintenance: abandoned --- # flake8-use-pathlib — A plugin for flake8 finding use of functions that can be replaced by pathlib module. License: permissive · Maintenance: abandoned · Downloads: 336.4K/mo ## What it is and what it does flake8-use-pathlib is a linter plugin that integrates with flake8 to automatically detect and flag legacy file-system operations from the os and os.path modules that should be replaced with pathlib equivalents. Each pattern is assigned a specific rule code so developers can quickly identify and modernize their code. The plugin works as a standard flake8 extension; once installed, it runs automatically during linting and reports violations with their corresponding rule codes and suggested pathlib replacements. It targets Python 3.7 and later, supporting current Python versions at the time of its last release. Use it for: - Enforce pathlib usage in new code reviews by catching os.path calls during CI/CD linting. - Bulk-identify legacy file-operation patterns in an existing codebase for systematic modernization. - Teach developers the pathlib API by providing immediate, specific feedback on os module usage. - Migrate projects from py.path.local to pathlib as part of a broader modernization effort. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A flake8 plugin that detects uses of os and os.path functions that have modern pathlib equivalents, flagging them with specific rule codes for replacement. Yes, if you are actively linting code and want to enforce pathlib adoption. The plugin is straightforward, has no security vulnerabilities, and carries a permissive license. However, be aware that the package is abandoned—it has not been updated since 2022-08-14. If you rely on it, verify that its rule set and flake8 compatibility remain suitable for your current Python and flake8 versions; do not expect bug fixes or new features. ## Install pip install flake8-use-pathlib uv add flake8-use-pathlib poetry add flake8-use-pathlib ## Installing flake8-use-pathlib Before you install: Low install friction; depends only on flake8. However, the package is abandoned—last release was 2022-08-14, over 1461 days ago. No active maintenance or bug fixes should be expected. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install flake8-use-pathlib # Then run flake8 on your code; the plugin activates automatically: flake8 your_file.py # Output will include lines like: # your_file.py:1:1: PL100 os.path.abspath("foo") should be replaced by foo_path.resolve() Requires flake8 to be installed and configured; the plugin does not work standalone. Verify before relying: - Whether the rule set remains complete for current pathlib best practices. - Compatibility with recent flake8 versions and Python 3.11+ (classifiers list only up to 3.10). - Whether all rule codes (PL100–PL124) remain accurate for modern pathlib usage patterns. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 336.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 pathlib migration, detect os.path usage, pathlib linter plugin, modernize file path code, os module replacement checker, pathlib code quality, flake8 file operations, linter, pathlib, code-modernization [View on SkillFed](https://skillfed.io/packages/flake8-use-pathlib) · [View on PyPI](https://pypi.org/project/flake8-use-pathlib/)