fix(lint): upgrade pip and use public pypi for yamllint#14746
fix(lint): upgrade pip and use public pypi for yamllint#14746abhipatel12 merged 3 commits intomainfrom
Conversation
This change updates the `scripts/lint.js` to: 1. Upgrade `pip` in the virtual environment before installing `yamllint`. This resolves compatibility issues with newer Python versions (e.g. 3.14). 2. Explicitly use `https://pypi.org/simple` as the index URL for `yamllint` installation to avoid potential authentication issues with private registries.
Summary of ChangesHello @allenhutchison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses and resolves existing issues with the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to fix issues with yamllint by upgrading pip and specifying the public PyPI index. While the intention is good, the implementation introduces a cross-platform compatibility issue. The hardcoded path to pip will not work on Windows. I've provided a critical review comment with a suggested fix to make the installer script platform-aware.
|
Size Change: -2 B (0%) Total Size: 21.5 MB ℹ️ View Unchanged
|
Corrected the `yamllint` installer in `scripts/lint.js` to properly use `path.join` for constructing the cross-platform Python executable path. Previously, `path.join` was incorrectly placed directly within the shell command string, leading to a `no-undef` ESLint error during pre-commit checks. This change extracts the path construction into a JavaScript variable, ensuring it's evaluated correctly before being used in the shell command. This fully addresses the review comment on PR #14746 regarding cross-platform compatibility.
Corrected the `yamllint` installer in `scripts/lint.js` to properly use `path.join` for constructing the cross-platform Python executable path. Previously, `path.join` was incorrectly placed directly within the shell command string, leading to a `no-undef` ESLint error during pre-commit checks. This change extracts the path construction into a JavaScript variable, ensuring it's evaluated correctly before being used in the shell command. This fully addresses the review comment on PR #14746 regarding cross-platform compatibility.
abhipatel12
left a comment
There was a problem hiding this comment.
LGTM! Thanks for fixing
This PR fixes issues with running
yamllinton environments with newer Python versions or private registry configurations.It upgrades
pipbefore installation and explicitly points to the public PyPI index foryamllint.