Conversation
Three forward-slash assumptions that break on Windows, all surfaced by
running the repo-utils test suites on Windows (cp936):
- check_auto.build_config_mapping_names: glob returns OS-native
separators, so config_path.split("/")[-2] never yields the module
directory name; every config then counts as a non-natural match and a
non-natural alias (e.g. MaskFormerDetrConfig for model_type=detr) can
overwrite the canonical class. Use os.path.basename(os.path.dirname()).
- check_noisy_comments._display_path: printed paths used OS separators,
making CI log output differ on Windows; print POSIX-style paths.
- test_conversion_order: FILES_TO_PARSE is built with os.path.join, so
splitting on "/" raises IndexError on Windows.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
CI recapDashboard: View test results in Grafana |
Member
|
cc @tarekziade more stuff that might be automatable with a Ruff rule rather than drip-feeding lots of small fix PRs |
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.
What
Running the repo-utils test suites on Windows surfaced three forward-slash assumptions:
check_auto.build_config_mapping_names—config_path.split("/")[-2]extracts the module directory from glob results, butglob.globreturns OS-native separators. On Windowsmodule_nameis never the directory name, somodel_type == module_nameis never true: every config counts as a non-natural match, and a non-natural alias (e.g.MaskFormerDetrConfigwithmodel_type="detr") overwrites the canonicalDetrConfig. This makes the generated auto-mapping content order-dependent on Windows. →os.path.basename(os.path.dirname(...)).check_noisy_comments._display_path— findings are printed with OS-native separators, so CI logs (and the tests asserting on them) differ by platform. → print POSIX-style paths via.as_posix().test_conversion_order—FILES_TO_PARSEis built withos.path.join, then split on"/", raisingIndexErroron Windows. → samebasename(dirname())extraction.Verification
Windows 11, cp936 locale, Python 3.14:
tests/repo_utils/test_check_auto.py4 failed,test_check_noisy_comments.py1 failed,modular/test_conversion_order.py1 failed.🤖 Generated with Claude Code