Conversation
There was a problem hiding this comment.
Pull request overview
Updates the CI Python version matrix to test against newer Python releases and reapplies Black formatting changes across the Python codebase.
Changes:
- Update GitHub Actions workflow jobs from Python 3.11 → 3.13 and 3.9 → 3.10.
- Apply formatting-only changes (tuple unpacking style, blank-line cleanup) consistent with current Black output.
- Minor tuple-unpacking style tweaks in examples, core, and parts modules.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/resources/upgrade_pcb.py | Removes stray whitespace line (formatting-only). |
| examples/jlcpcb_pcba_postprocess.py | Tuple unpacking formatting (no functional change). |
| edg/parts/init.py | Removes stray whitespace line (formatting-only). |
| edg/parts/Rf_Pn7160.py | Removes stray whitespace line (formatting-only). |
| edg/parts/Microcontroller_Esp.py | Removes stray whitespace line (formatting-only). |
| edg/hdl_server/main.py | Removes stray whitespace line (formatting-only). |
| edg/electronics_model/test_kicad.py | Tuple unpacking formatting in tests (no functional change). |
| edg/core/Refinements.py | Removes stray whitespace line (formatting-only). |
| edg/core/Generator.py | Removes stray whitespace line (formatting-only). |
| edg/core/Core.py | Removes stray whitespace line (formatting-only). |
| edg/core/BufferSerializer.py | Removes stray whitespace line (formatting-only). |
| edg/core/Blocks.py | Tuple unpacking formatting (no functional change). |
| edg/abstract_parts/StandardFootprint.py | Removes stray whitespace line (formatting-only). |
| edg/abstract_parts/PassiveConnector.py | Tuple unpacking formatting (no functional change). |
| edg/abstract_parts/ESeriesUtil.py | Removes stray whitespace line (formatting-only). |
| edg/abstract_parts/AbstractLed.py | Removes stray whitespace line (formatting-only). |
| edg/BoardCompiler.py | Tuple unpacking formatting (no functional change). |
| .github/workflows/pr-python.yml | Bumps Python versions for CI jobs (but currently contains workflow-breaking indentation in some jobs). |
Comments suppressed due to low confidence (1)
.github/workflows/pr-python.yml:47
- The step name
install mypyin the black job is misleading: it installs requirements plusblack, notmypy. Renaming the step to match what it actually installs will make CI logs clearer.
- name: install mypy
run: |
pip install -r requirements.txt
pip install black
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/pr-python.yml
Outdated
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/setup-python@v1 |
There was a problem hiding this comment.
The steps: block under mypy_latest_3_13 is not valid YAML: the - uses: entries are indented at the same level as steps: instead of being nested beneath it. This will prevent the workflow from parsing/running. Indent the step list items under steps: (consistent with the black_latest_3_13 job).
.github/workflows/pr-python.yml
Outdated
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/setup-python@v1 | ||
| with: |
There was a problem hiding this comment.
Same YAML indentation issue as above: in unittest_latest_3_13, the - uses: entries are not indented under steps:. This makes the workflow invalid and will break CI execution.
.github/workflows/pr-python.yml
Outdated
| - uses: actions/checkout@v1 | ||
| - uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: '3.11' | ||
| python-version: '3.13' |
There was a problem hiding this comment.
These jobs still use actions/checkout@v1 and actions/setup-python@v1. With the move to Python 3.13, this increases the chance CI fails due to unsupported runtimes and also misses newer caching/security fixes. Update to the current major versions (eg, checkout v4 and setup-python v5) and keep python-version: 3.13.
| black_latest_3_13: | ||
| needs: pre_job | ||
| if: ${{ needs.pre_job.outputs.should_skip != 'true' }} |
There was a problem hiding this comment.
Renaming the job IDs (eg black_latest_3_11 -> black_latest_3_13) will change the required status check names reported to GitHub. If branch protection rules depend on the old names, merges may be blocked until those rules are updated. Consider keeping stable job IDs and only changing the displayed name/step config, or coordinate the branch protection update.
Bump latest to Python3.13, and bumps 3.9 to 3.10 as 3.9 is no longer available.
Reblacken, it appears the default style has changed.
Also cleans up YAML formatting and updates actions versions