Skip to content

Conversation

@sahil-kale
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 21, 2025 03:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes build issues for Linux by addressing subprocess encoding problems and removing an unnecessary package dependency. The title contains a typo: "FIx" should be "Fix".

  • Improves subprocess output handling with proper encoding and error replacement to handle non-UTF-8 characters
  • Removes python3-tk from build requirements as it's no longer needed
  • Adds type hints and refactors the run_command function for better reliability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/build_requirements.json Removes python3-tk package from the list of required build dependencies
scripts/build_book.py Refactors run_command function to merge stdout/stderr streams, adds encoding error handling, and includes type hints for improved robustness on Linux
Comments suppressed due to low confidence (1)

scripts/build_book.py:36

  • Import of 'sys' is not used.
import sys

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


def run_command(command):
"""Run a shell command and handle its output."""
import sys
Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import statement for 'sys' is placed in the middle of the file after function definitions. According to PEP 8, all imports should be at the top of the file, grouped with other standard library imports.

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +38
import sys


Copy link

Copilot AI Dec 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'sys' module is imported but never used in the code. Consider removing this unused import.

Suggested change
import sys

Copilot uses AI. Check for mistakes.
@sahil-kale sahil-kale merged commit 3631b52 into main Dec 21, 2025
7 checks passed
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