-
Notifications
You must be signed in to change notification settings - Fork 0
Fix trailing whitespace in AGENTS.md causing pre-commit hook failures in PR #3 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ianlintner <500914+ianlintner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR significantly expands the AGENTS.md documentation file from a minimal guide (~30 lines) to a comprehensive reference document (450+ lines) for AI coding agents working with the Python Interview Algorithms Workbook repository.
Key changes:
- Adds detailed repository structure, setup instructions, and code style conventions
- Expands testing guidelines with comprehensive command examples
- Documents architecture patterns, demo system requirements, and PR submission guidelines
- Includes troubleshooting tips and quick reference commands
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Format code (Ruff formatter) | ||
| ruff format . | ||
|
|
||
| # Lint code (Ruff rules E,F,I,B,UP etc.) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states Ruff uses rules 'E,F,I,B,UP etc.' but according to pyproject.toml line 39, 'UP' is explicitly ignored. The comment should be updated to reflect the actual configuration: 'E,F,I,B' without mentioning UP as an active rule.
| # Lint code (Ruff rules E,F,I,B,UP etc.) | |
| # Lint code (Ruff rules E,F,I,B etc.) |
| - **Fix-up utilities:** `fix_leetcode_syntax_corruption.py`, `fix_comprehensive_leetcode_corruption.py` | ||
| - These scripts enforce **consistency of the LeetCode-style notebooks** | ||
| - **Do not modify them casually**—they maintain notebook formatting standards | ||
| - Run these scripts after making changes to notebook files |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation references fix-up utilities fix_leetcode_syntax_corruption.py and fix_comprehensive_leetcode_corruption.py, but these files do not exist in the repository. Only scripts/leetcode_manager.py is present. This section should be updated to reference the actual existing scripts or removed if these utilities were deprecated.
| - **Fix-up utilities:** `fix_leetcode_syntax_corruption.py`, `fix_comprehensive_leetcode_corruption.py` | |
| - These scripts enforce **consistency of the LeetCode-style notebooks** | |
| - **Do not modify them casually**—they maintain notebook formatting standards | |
| - Run these scripts after making changes to notebook files | |
| - **Notebook management utility:** `scripts/leetcode_manager.py` | |
| - This script enforces **consistency of the LeetCode-style notebooks** | |
| - **Do not modify it casually**—it maintains notebook formatting standards | |
| - Run this script after making changes to notebook files |
PR #3 fails CI because the
trim-trailing-whitespacepre-commit hook modifies AGENTS.md during validation, causing the build to fail with "files were modified by this hook."Changes
The issue occurs in blank lines within a code example that contained 4 spaces before the newline:
Applied fix:
sed 's/[[:space:]]*$//'to strip all trailing whitespace.Application to PR #3
The maintainer can apply this fix to PR #3's
copilot/setup-copilot-instructionsbranch via:Or cherry-pick from this PR:
git checkout origin/copilot/fix-failed-tests-on-pr -- AGENTS.mdOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.