Skip to content

Commit 540d168

Browse files
authored
Expand python format CI check to all code but third-party (#28437)
Expand python formatting check CI workflow (which uses `black`) to the entire repo except `third-party/` and `test/`, and `black`en all affected files once to begin with. Also: - Manually run `2to3` on files that `black` failed to process (as a one-off), which was due to them being written for Python 2. - Set `black` CI check to use latest available (currently `26.1.0`, previously pinned to `24.4.0`). - Add `push` workflow trigger so this runs on pushes to `main`. [reviewed by @DanilaFe, thanks!] Testing: - [x] CI check passes - [x] CI check fails on incorrectly formatted python files - [x] paratest
2 parents 4f3725b + 1178e61 commit 540d168

90 files changed

Lines changed: 11372 additions & 7976 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: CI Format Check
22

3-
on:
4-
pull_request:
5-
paths:
6-
- 'tools/chapel-py/**/*.py'
7-
- 'tools/chplcheck/**/*.py'
8-
- 'tools/chpl-language-server/**/*.py'
9-
workflow_dispatch:
3+
on: [push, pull_request, workflow_dispatch]
104

115
jobs:
126
check-format:
@@ -15,6 +9,5 @@ jobs:
159
- uses: actions/checkout@v4
1610
- uses: psf/black@stable
1711
with:
18-
options: "--check --verbose --line-length 80"
19-
src: "./tools/chapel-py ./tools/chplcheck ./tools/chpl-language-server"
20-
version: "24.4.0"
12+
options: "--check --verbose --line-length 80 --extend-exclude '(third-party/|test/)'"
13+
src: "."

compiler/etc/chpl_lldb_debuggerBreakHere.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ def debuggerBreakHere_callback(frame, bp_loc, internal_dict):
77
if fn and fn.name.startswith("debuggerBreakHere("):
88
thread.SetSelectedFrame(2)
99

10+
1011
def __lldb_init_module(debugger, internal_dict):
11-
debugger.HandleCommand('breakpoint command delete debuggerBreakHere')
12-
debugger.HandleCommand('breakpoint command add --python-function chpl_lldb_debuggerBreakHere.debuggerBreakHere_callback debuggerBreakHere')
12+
debugger.HandleCommand("breakpoint command delete debuggerBreakHere")
13+
debugger.HandleCommand(
14+
"breakpoint command add --python-function chpl_lldb_debuggerBreakHere.debuggerBreakHere_callback debuggerBreakHere"
15+
)

0 commit comments

Comments
 (0)