FIx build for linux#226
Conversation
There was a problem hiding this comment.
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-tkfrom build requirements as it's no longer needed - Adds type hints and refactors the
run_commandfunction 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 |
There was a problem hiding this comment.
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.
| import sys | ||
|
|
||
|
|
There was a problem hiding this comment.
The 'sys' module is imported but never used in the code. Consider removing this unused import.
| import sys |
No description provided.