Skip to content

Commit 3ed27fd

Browse files
committed
Check arguments before using them
1 parent 6f0dbbc commit 3ed27fd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmdstanpy/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def __init__(
128128
)
129129
self._name = model_name.strip()
130130

131+
self._compiler_options.validate()
132+
131133
if stan_file is None:
132134
if exe_file is None:
133135
raise ValueError(
@@ -182,8 +184,6 @@ def __init__(
182184
' found: {}.'.format(self._name, exename)
183185
)
184186

185-
self._compiler_options.validate()
186-
187187
if platform.system() == 'Windows':
188188
try:
189189
do_command(['where.exe', 'tbb.dll'], fd_out=None)
@@ -280,6 +280,7 @@ def src_info(self) -> Dict[str, Any]:
280280
self.stanc_options is not None
281281
and 'include-paths' in self.stanc_options
282282
):
283+
print(self.stanc_options)
283284
includes = '--include-paths=' + ','.join(
284285
Path(p).as_posix()
285286
for p in self.stanc_options['include-paths'] # type: ignore

0 commit comments

Comments
 (0)