@@ -226,7 +226,6 @@ def compare_unittests(args):
226
226
227
227
228
228
def run_cpython_test (args ):
229
- import glob
230
229
interp_args = []
231
230
globs = []
232
231
test_args = []
@@ -511,7 +510,8 @@ def graalpytest(args):
511
510
return do_run_python (cmd_args )
512
511
513
512
514
- def _list_graalpython_unittests (paths = None , exclude = []):
513
+ def _list_graalpython_unittests (paths = None , exclude = None ):
514
+ exclude = [] if exclude is None else exclude
515
515
paths = paths or [_graalpytest_root ()]
516
516
def is_included (path ):
517
517
if path .endswith (".py" ):
@@ -1708,7 +1708,7 @@ def build(self):
1708
1708
args += ["--python.WithThread" ,
1709
1709
"--python.PyCachePrefix=" + pycache_dir ,
1710
1710
"-B" ,
1711
- "-S" , os .path .join (self .src_dir () , "setup.py" ),
1711
+ "-S" , os .path .join (self .src_dir (), "setup.py" ),
1712
1712
self .subject .get_output_root ()]
1713
1713
mx .ensure_dir_exists (cwd )
1714
1714
rc = self .run (args , cwd = cwd )
@@ -1842,21 +1842,21 @@ def checkout_find_version_for_graalvm(args):
1842
1842
orig_clean = mx .command_function ("clean" )
1843
1843
def python_clean (args ):
1844
1844
orig_clean (args )
1845
- count = 0 ;
1845
+ count = 0
1846
1846
for path in os .walk (SUITE .dir ):
1847
1847
for file in glob .iglob (os .path .join (path [0 ], '*.pyc' )):
1848
1848
count += 1
1849
1849
os .remove (file )
1850
1850
1851
1851
if count > 0 :
1852
- print ('Cleaning' , count , "`*.pyc` files..." )
1852
+ print ('Cleaning' , count , "`*.pyc` files..." )
1853
1853
1854
1854
def update_hpy_import_cmd (args ):
1855
1855
"""Update our import of HPy sources."""
1856
1856
parser = ArgumentParser ('mx python-update-hpy-import' )
1857
1857
parser .add_argument ('--pull' , action = 'store_true' , help = 'Perform a pull of the HPy repo first.' , required = False )
1858
1858
parser .add_argument ('hpy_repo' , metavar = 'HPY_REPO' , help = 'Path to the HPy repo to import from.' )
1859
- parsed_args , remaining_args = parser .parse_known_args (args )
1859
+ parsed_args , _ = parser .parse_known_args (args )
1860
1860
1861
1861
join = os .path .join
1862
1862
vc = SUITE .vc
@@ -1901,7 +1901,7 @@ def update_hpy_import_cmd(args):
1901
1901
1902
1902
def import_files (from_dir , to_dir ):
1903
1903
mx .log ("Importing HPy files from {}" .format (from_dir ))
1904
- for dirpath , dirnames , filenames in os .walk (from_dir ):
1904
+ for dirpath , _ , filenames in os .walk (from_dir ):
1905
1905
relative_dir_path = os .path .relpath (dirpath , start = from_dir )
1906
1906
# ignore dir 'cpython' and all its subdirs
1907
1907
for filename in filenames :
0 commit comments