File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 1313from typing import Any , Iterable
1414
1515from 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
2217from cmdstanpy .utils .command import do_command
2318from 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 :
You can’t perform that action at this time.
0 commit comments