This repository was archived by the owner on Oct 30, 2026. It is now read-only.
Repository navigation
Conversation
Co-authored-by: River <river@shopify.com>
madmath
marked this pull request as ready for review
October 29, 2026 15:15
Author
|
@stephanie-shopify could you review this change? Please see the description for compatibility questions and verification limitations. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Keep caller-supplied file paths from being interpreted as linter options.
Compatibility review needed: this rejects leading-dash paths with
ValueErrorrather than normalizing them. Callers relying on those paths may need changes; supported legacy Python versions remain unverified.Validation used Python 3.11.15, Pylint 2.17.7 and pytest 7.4.4 because the declared legacy environment was unavailable:
python -m pytest -q tests/shopify_python/test_git_utils.py::test_linter_rejects_paths_that_look_like_options: fails before the guard, passes after.python -m pytest -q tests/shopify_python/test_git_utils.py --randomly-seed=1: 12 passed, 3 failed; the same 3 existing failures occur on the baseline.make run_tests: 43 passed, 37 failed, 2 skipped; all 37 failures also occur on the baseline.pycodestyle shopify_python/git_utils.py tests/shopify_python/test_git_utils.pyandgit diff --check: pass.make lint: fails on legacy config/plugin incompatibilities; modern Pylint also requests an f-string for the Python-2-compatible error message.mypy --py2 shopify_python tests/shopify_python --ignore-missing-importscannot run withouttyped_ast.