Skip to content

Commit 26db4dd

Browse files
committed
Using subprocess to shell out and call jlfmt instead of using juliacall.
1 parent 1c40b2a commit 26db4dd

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

bin/generate_tests.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,13 @@ def format_file(path: Path) -> NoReturn:
287287
Runs JuliaFormatter auto-formatter on file at path
288288
"""
289289

290-
jl.seval("using JuliaFormatter")
291-
style = jl.JuliaFormatter.YASStyle()
292-
jl.JuliaFormatter.format_file(str(path), style, verbose=True, remove_extra_newlines=True)
290+
#below is the juliacall method
291+
# jl.seval("using JuliaFormatter")
292+
# style = jl.JuliaFormatter.YASStyle()
293+
# jl.JuliaFormatter.format_file(str(path), style, verbose=True, remove_extra_newlines=True)
294+
295+
# This uses subprocess to shell out and call jlfmt from the command line
296+
check_call(["jlfmt", path, "-i", "-v", "--style=yas"])
293297

294298

295299
def check_template(slug: str, tests_path: Path, tmpfile: Path):

0 commit comments

Comments
 (0)