@@ -62,8 +62,8 @@ def test_bernoulli_good(self, stanfile='bernoulli.stan'):
6262 iter_sampling = 100 ,
6363 show_progress = False ,
6464 )
65- self .assertIn ('CmdStanMCMC: model=bernoulli' , bern_fit . __repr__ ( ))
66- self .assertIn ('method=sample' , bern_fit . __repr__ ( ))
65+ self .assertIn ('CmdStanMCMC: model=bernoulli' , repr ( bern_fit ))
66+ self .assertIn ('method=sample' , repr ( bern_fit ))
6767
6868 self .assertEqual (bern_fit .runset ._args .method , Method .SAMPLE )
6969
@@ -99,8 +99,8 @@ def test_bernoulli_good(self, stanfile='bernoulli.stan'):
9999 metric = 'dense_e' ,
100100 show_progress = False ,
101101 )
102- self .assertIn ('CmdStanMCMC: model=bernoulli' , bern_fit . __repr__ ( ))
103- self .assertIn ('method=sample' , bern_fit . __repr__ ( ))
102+ self .assertIn ('CmdStanMCMC: model=bernoulli' , repr ( bern_fit ))
103+ self .assertIn ('method=sample' , repr ( bern_fit ))
104104
105105 self .assertEqual (bern_fit .runset ._args .method , Method .SAMPLE )
106106
@@ -221,7 +221,7 @@ def test_init_types(self):
221221 inits = 1.1 ,
222222 show_progress = False ,
223223 )
224- self .assertIn ('init=1.1' , bern_fit .runset . __repr__ ( ))
224+ self .assertIn ('init=1.1' , repr ( bern_fit .runset ))
225225
226226 bern_fit = bern_model .sample (
227227 data = jdata ,
@@ -233,7 +233,7 @@ def test_init_types(self):
233233 inits = 1 ,
234234 show_progress = False ,
235235 )
236- self .assertIn ('init=1' , bern_fit .runset . __repr__ ( ))
236+ self .assertIn ('init=1' , repr ( bern_fit .runset ))
237237
238238 # Save init to json
239239 inits_path1 = os .path .join (_TMPDIR , 'inits_test_1.json' )
@@ -255,7 +255,7 @@ def test_init_types(self):
255255 )
256256 self .assertIn (
257257 'init={}' .format (inits_path1 .replace ('\\ ' , '\\ \\ ' )),
258- bern_fit .runset . __repr__ ( ),
258+ repr ( bern_fit .runset ),
259259 )
260260
261261 bern_fit = bern_model .sample (
@@ -270,7 +270,7 @@ def test_init_types(self):
270270 )
271271 self .assertIn (
272272 'init={}' .format (inits_path1 .replace ('\\ ' , '\\ \\ ' )),
273- bern_fit .runset . __repr__ ( ),
273+ repr ( bern_fit .runset ),
274274 )
275275
276276 with self .assertRaises (ValueError ):
@@ -317,7 +317,6 @@ def test_bernoulli_bad(self):
317317 bern_model .sample (data = jdata , chains = 1 , output_dir = path )
318318 os .rmdir (dirname1 )
319319
320- # pylint: disable=no-self-use
321320 def test_multi_proc_1 (self ):
322321 logistic_stan = os .path .join (DATAFILES_PATH , 'logistic.stan' )
323322 logistic_model = CmdStanModel (stan_file = logistic_stan )
@@ -338,7 +337,6 @@ def test_multi_proc_1(self):
338337 ('cmdstanpy' , 'INFO' , 'Chain [2] start processing' ),
339338 )
340339
341- # pylint: disable=no-self-use
342340 def test_multi_proc_2 (self ):
343341 logistic_stan = os .path .join (DATAFILES_PATH , 'logistic.stan' )
344342 logistic_model = CmdStanModel (stan_file = logistic_stan )
@@ -615,7 +613,7 @@ def test_bernoulli_file_with_space(self):
615613
616614 def test_bernoulli_path_with_space (self ):
617615 self .test_bernoulli_good (
618- 'path with space/' 'bernoulli_path_with_space.stan'
616+ 'path with space/' + 'bernoulli_path_with_space.stan'
619617 )
620618
621619 def test_index_bounds_error (self ):
@@ -922,7 +920,6 @@ def test_from_csv_fixed_param(self):
922920 fixed_param_sample = from_csv (path = csv_path )
923921 self .assertEqual (fixed_param_sample .draws_pd ().shape , (100 , 85 ))
924922
925- # pylint: disable=no-self-use
926923 def test_custom_metric (self ):
927924 stan = os .path .join (DATAFILES_PATH , 'bernoulli.stan' )
928925 jdata = os .path .join (DATAFILES_PATH , 'bernoulli.data.json' )
0 commit comments