Skip to content

Commit ba09866

Browse files
committed
chore: address AI code review comments
- Pass exit codes during code generation by removing masked error trap. - Fix README.md instructions for navigating before setup. - Add explicit utf-8 encodings when opening JSON files.
1 parent 4825532 commit ba09866

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ Python.
3434
For now, you can install the SDK using the following commands:
3535

3636
```bash
37-
# Create a directory for the SDK
38-
mkdir sdk
39-
4037
# Clone the repository
4138
git clone https://github.com/Universal-Commerce-Protocol/python-sdk.git
4239

40+
# Navigate to the directory
41+
cd python-sdk
42+
4343
# Install dependencies
4444
uv sync
4545
```

generate_models.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ uv run \
7575

7676
echo "Formatting generated models..."
7777
uv run ruff format
78-
uv run ruff check --fix "$OUTPUT_DIR" 2>&1 | grep -E "^(All checks passed|Fixed|Found)" || echo "Formatting complete"
78+
uv run ruff check --fix "$OUTPUT_DIR"
7979

8080

8181
echo "Done. Models generated in $OUTPUT_DIR"

preprocess_schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
def load_json(path):
2424
"""Loads JSON data from a file."""
25-
with open(path) as f:
25+
with open(path, "r", encoding="utf-8") as f:
2626
return json.load(f)
2727

2828

2929
def save_json(data, path):
3030
"""Saves data to a JSON file with standard indentation."""
31-
with open(path, "w") as f:
31+
with open(path, "w", encoding="utf-8") as f:
3232
json.dump(data, f, indent=2)
3333

3434

0 commit comments

Comments
 (0)