Skip to content

Commit bf39084

Browse files
committed
Fix pylint issues
1 parent cd6736f commit bf39084

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

cmdstanpy/install_cmdstan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ def retrieve_version(version: str, progress: bool = True) -> None:
523523
first = tar.next()
524524
if first is not None:
525525
top_dir = first.name
526+
else:
527+
top_dir = ''
526528
cmdstan_dir = f'cmdstan-{version}'
527529
if top_dir != cmdstan_dir:
528530
raise CmdStanInstallError(

cmdstanpy/install_cxx_toolchain.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,10 @@ def get_toolchain_name() -> str:
235235
return ''
236236

237237

238+
# TODO(2.0): drop 3.5 support
238239
def get_url(version: str) -> str:
239240
"""Return URL for toolchain."""
241+
url = ''
240242
if platform.system() == 'Windows':
241243
if version == '4.0':
242244
# pylint: disable=line-too-long
@@ -277,6 +279,8 @@ def run_rtools_install(args: Dict[str, Any]) -> None:
277279

278280
if 'verbose' in args:
279281
verbose = args['verbose']
282+
else:
283+
verbose = False
280284

281285
install_dir = args['dir']
282286
if install_dir is None:

cmdstanpy/utils/stancsv.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def scan_optimize_csv(path: str, save_iters: bool = False) -> Dict[str, Any]:
116116
all_iters[i, :] = [float(x) for x in xs]
117117
if i == iters - 1:
118118
mle: np.ndarray = np.array(xs, dtype=float)
119+
# pylint: disable=possibly-used-before-assignment
119120
dict['mle'] = mle
120121
if save_iters:
121122
dict['all_iters'] = all_iters

0 commit comments

Comments
 (0)