Skip to content

Fix python -c indentation + replace raw pip with uv pip#4

Open
Saikiran8 wants to merge 2 commits intoearth-mover:mainfrom
Saikiran8:ci-pr
Open

Fix python -c indentation + replace raw pip with uv pip#4
Saikiran8 wants to merge 2 commits intoearth-mover:mainfrom
Saikiran8:ci-pr

Conversation

@Saikiran8
Copy link
Copy Markdown

  1. Replace multiline Python -c snippets with heredocs to avoid indentation errors
  2. Use uv pip download instead of system pip to ensure the correct interpreter

@ianhi
Copy link
Copy Markdown
Collaborator

ianhi commented Jan 29, 2026

Hi @Saikiran8 thanks for opening a PR. Can you please explain the motivation for the change from -c which seems to be wokring fine as is.

I agree that it might make sense to download with uv instead of normal pip.

@Saikiran8
Copy link
Copy Markdown
Author

Saikiran8 commented Jan 29, 2026

Thanks for the comment and consideration @ianhi .
python -c works, but multi-line -c blocks are fragile in YAML/shell contexts because whitespace and quoting are easy to accidentally change, which can lead to IndentationError or escaping issues.
I’ve run into this in the past when embedding secrets in EC2 user_data, where small indentation or quoting changes caused scripts to break in non-obvious ways. Using a heredoc may avoid this entire class of problems: the script body is passed verbatim, it’s easier to read and extend, and it’s the standard pattern for running multi-line shell or Python code in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants