py-modernize
Python Codebase Modernization
Upgrade Python projects to use modern tooling, syntax, and patterns following Engineering Charter principles.
Objectives
- Migrate from pip to uv for faster dependency management
- Upgrade Python syntax to 3.13+ modern patterns
- Replace deprecated APIs and patterns
- Update tooling to current best practices
- Ensure pyproject.toml is the single source of configuration
Required Tools
Install uv globally (via package manager): sudo zypper install uv or pip install --user uv
Add to [dependency-groups] dev: "pyupgrade", "ruff"
More from l-mb/python-refactoring-skills
py-refactor
Orchestrate comprehensive Python refactoring - coordinates security, complexity, testing, code health, and modernization skills to systematically improve code quality.
27py-complexity
Reduce cyclomatic and cognitive complexity in Python code. Break down complex functions, simplify control flow, and track complexity trends over time.
19py-code-health
Detect and remove dead code, duplicate code, and unused imports. Consolidate similar code patterns into parametrized functions.
18py-quality-setup
Configure ruff, mypy, and basedpyright for Python 3.13 projects. Use when setting up linters and type checkers in pyproject.toml and pyrightconfig.json.
13py-test-quality
Measure and improve test coverage and test suite quality using code coverage and mutation testing. Ensures tests actually catch bugs.
11py-security
Security vulnerability detection and remediation for Python codebases. Identifies SQL injection, hardcoded secrets, weak cryptography, and other OWASP vulnerabilities.
9