Automatically detect and fix Python deprecation warnings in codebases, including datetime.utcnow(), and other common deprecated patterns. Supports extensible pattern matching for future deprecations.
A Claude skill that automatically detects and fixes deprecated Python patterns in your codebase.
# Scan for deprecations
python3 scripts/fix_deprecations.py /path/to/project --scan-only
# Preview fixes
python3 scripts/fix_deprecations.py /path/to/project --dry-run
# Apply fixes
python3 scripts/fix_deprecations.py /path/to/project --fix
datetime.utcnow() → datetime.now(UTC)datetime.utcfromtimestamp() → datetime.fromtimestamp(*, UTC)collections.Mapping → collections.abc.Mappingcollections.Sequence → collections.abc.Sequencecollections.Iterable → collections.abc.Iterableself.assertEquals() → self.assertEqual()self.assert_() → self.assertTrue()threading.currentThread() → threading.current_thread()threading.activeCount() → threading.active_count()See SKILL.md for complete documentation.
Edit scripts/deprecation_patterns.json to add new deprecation patterns:
{
"name": "your_pattern_name",
"category": "category_name",
"deprecated": "old_syntax",
"replacement": "new_syntax",
"regex": "regex_pattern",
"replacement_template": "replacement_template",
"required_imports": ["import statements"],
"python_version": "3.x+",
"description": "Description of the deprecation"
}
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer