Conversation
DIRECTORY.md is auto-generated and touched by nearly every open PR, so it dominated the 'possible merge conflicts' list and distracted maintainers. Pull it out into a dedicated section at the very bottom of the report that separates PRs whose only overlap is DIRECTORY.md (safe to 'accept both' in the GitHub UI) from PRs that also collide on real source files. Also render the Script path relative to the git root instead of an absolute machine-specific path.
for more information, see https://pre-commit.ci
mindaugl
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your change
Per @cclauss's request in #15081, this reworks
scripts/pr_file_map.pyso thatDIRECTORY.mdno longer distracts busy maintainers.DIRECTORY.mdis auto-generated, so nearly every open PR modifies it. That meant it was always the single most "contested" file and dominated the possible merge conflicts list, drowning out the real source-file collisions maintainers actually need to coordinate.Changes
DIRECTORY.mdgets its own section at the very bottom of the report, out of the contested/existing lists. Because a conflict caused only by this file is trivially resolved with accept both in the GitHub UI, that bottom section splits the PRs into:DIRECTORY.md— safe to accept both, no rebase needed; andDIRECTORY.md, so it reflects only real source-file hot spots.Script:line is now relative to the git root (scripts/pr_file_map.py) instead of an absolute, machine-specific path like/Users/cclauss/TheAlgorithms/Python/scripts/pr_file_map.py.split_directory_conflicts,render_file_section,render_directory_section) to keepmain()under the McCabe/branch limits.ruff checkandruff format --checkare green, and I unit-tested the rendering against mockedghdata to confirm the categorization and the relative path.Checklist