Automatically fix pylint issues in azure-ai-ml package following Azure SDK Python guidelines and existing code patterns. Expects GitHub issue URL and optional virtual env path in the request. Format "fix pylint issue <issue-url> [using venv <path>]"
Fix Pylint Issues Skill
This skill automatically fixes pylint warnings in the azure-ai-ml package by analyzing existing code patterns and applying fixes with 100% confidence based on GitHub issues.
Scope: Fix only mandatory/blocking issues — warnings that will cause CI to fail. Leave optional/informational warnings as-is.
Overview
Intelligently fixes pylint issues by:
Getting the GitHub issue URL from the user
Reading and analyzing the issue details
Setting up or using existing virtual environment
Installing required dependencies
Running pylint on the specific files/areas mentioned in the issue
Analyzing the pylint output to identify warnings
Searching codebase for existing patterns to follow
Applying fixes only with 100% confidence
Re-running pylint to verify fixes
Providing a summary of what was fixed
Running Pylint
Command:
cd sdk/ml/azure-ai-ml
azpysdk pylint .
Note:azpysdk runs at the package level only. To focus on specific files, run the full check and filter the output by file path.
Based on the GitHub issue details, determine which files to check:
Option A - Run pylint on the package and filter output:
# Ensure you're in azure-ai-ml directory (within activated venv)
cd sdk/ml/azure-ai-ml
# Run pylint on the full package, then filter output for files from the issue
azpysdk pylint .
# Review output for warnings in the specific files/modules mentioned in the issue
Option B - Check modified files (if no specific target):
⚠️ Ensure virtual environment is still activated before running:
# Navigate to azure-ai-ml directory
cd sdk/ml/azure-ai-ml
# Run pylint on the package (within activated venv)
azpysdk pylint .
# Filter output for the specific files/modules from the issue
Step 5: Analyze Warnings
Parse the pylint output to identify:
Warning type and code (e.g., C0103, W0212, R0913)
File path and line number
Specific issue description
Cross-reference with the GitHub issue to ensure you're fixing the right problems
Step 6: Search for Existing Patterns
Before fixing, search the codebase for how similar issues are handled:
# Example: Search for similar function patterns
grep -r "pattern" sdk/ml/azure-ai-ml/
Use the existing code patterns to ensure consistency.
Step 7: Apply Fixes (ONLY if 100% confident)
Fix only mandatory/blocking issues. Skip optional or informational warnings that do not cause CI failure.
ALLOWED ACTIONS:
Fix warnings with 100% confidence
Use existing file patterns as reference
Follow Azure SDK Python guidelines
Make minimal, targeted changes
FORBIDDEN ACTIONS:
Fix warnings without complete confidence
Create new files for solutions
Import non-existent modules
Add new dependencies or imports
Make unnecessary large changes
Change code style without clear reason
Delete code without clear justification