Skip to content

Commit

Permalink
Fix pylint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed May 21, 2024
1 parent cd6736f commit bf39084
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmdstanpy/install_cmdstan.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ def retrieve_version(version: str, progress: bool = True) -> None:
first = tar.next()
if first is not None:
top_dir = first.name
else:
top_dir = ''
cmdstan_dir = f'cmdstan-{version}'
if top_dir != cmdstan_dir:
raise CmdStanInstallError(
Expand Down
4 changes: 4 additions & 0 deletions cmdstanpy/install_cxx_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ def get_toolchain_name() -> str:
return ''


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

if 'verbose' in args:
verbose = args['verbose']
else:
verbose = False

install_dir = args['dir']
if install_dir is None:
Expand Down
1 change: 1 addition & 0 deletions cmdstanpy/utils/stancsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def scan_optimize_csv(path: str, save_iters: bool = False) -> Dict[str, Any]:
all_iters[i, :] = [float(x) for x in xs]
if i == iters - 1:
mle: np.ndarray = np.array(xs, dtype=float)
# pylint: disable=possibly-used-before-assignment
dict['mle'] = mle
if save_iters:
dict['all_iters'] = all_iters
Expand Down

0 comments on commit bf39084

Please sign in to comment.