Skip to content

Commit d9b5386

Browse files
authored
[Python] Compile only flag for type testing (#4327)
1 parent d0629e4 commit d9b5386

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/python-type-checking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
issue-number: ${{ github.event.pull_request.number }}
8282
edit-mode: replace
8383
body: |
84-
## Python Type Checking (Pyright) Results
84+
## Python Type Checking Results (Pyright)
8585
8686
${{ steps.pyright.outputs.result }}
8787

src/Fable.Build/Test/Python.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ let handle (args: string list) =
1515
let skipFableLibraryCore = args |> List.contains "--skip-fable-library-core"
1616
let isWatch = args |> List.contains "--watch"
1717
let noDotnet = args |> List.contains "--no-dotnet"
18+
let compileOnly = args |> List.contains "--compile-only"
1819
let runTyping = args |> List.contains "--type-check"
1920
let runFormat = args |> List.contains "--format"
2021

@@ -78,7 +79,10 @@ let handle (args: string list) =
7879
Command.Run("uv", $"run ruff format {buildDir}")
7980

8081
// Run pytest
81-
Command.Run("uv", $"run pytest {buildDir} -x")
82+
if compileOnly then
83+
printfn "Skipping test execution (--compile-only specified)"
84+
else
85+
Command.Run("uv", $"run pytest {buildDir} -x")
8286

8387
// Count the number of typing errors (so we can keep an eye on them)
8488
if runTyping then

0 commit comments

Comments
 (0)