Skip to content

Commit 5429f40

Browse files
committed
Fix formatting
1 parent 532c963 commit 5429f40

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

cmdstanpy/compilation.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
from typing import Any, Iterable
1414

1515
from cmdstanpy.utils import get_logger
16-
from cmdstanpy.utils.cmdstan import (
17-
EXTENSION,
18-
cmdstan_path,
19-
cmdstan_version,
20-
stanc_path,
21-
)
16+
from cmdstanpy.utils.cmdstan import EXTENSION, cmdstan_path, stanc_path
2217
from cmdstanpy.utils.command import do_command
2318
from cmdstanpy.utils.filesystem import SanitizedOrTmpFilePath
2419

@@ -469,12 +464,8 @@ def format_stan_file(
469464
else:
470465
cmd.append('--print-canonical')
471466

472-
elif max_line_length != 78:
473-
raise ValueError(
474-
"Invalid arguments passed for current CmdStan version"
475-
+ " ({})\n".format(cmdstan_version() or "Unknown")
476-
+ "--max-line-length requires 2.29 or higher"
477-
)
467+
cmd.append('--auto-format')
468+
cmd.append(f'--max-line-length={max_line_length}')
478469

479470
out = subprocess.run(cmd, capture_output=True, text=True, check=True)
480471
if out.stderr:

0 commit comments

Comments
 (0)