@@ -156,8 +156,6 @@ def do_run_python(args, extra_vm_args=None, env=None, jdk=None, extra_dists=None
156
156
for tool in ["CHROMEINSPECTOR" , "TRUFFLE_COVERAGE" ]:
157
157
if os .path .exists (mx .suite ("tools" ).dependency (tool ).path ):
158
158
dists .append (tool )
159
- else :
160
- mx .logv ("%s was not built, not including it automatically" % tool )
161
159
162
160
graalpython_args .insert (0 , '--experimental-options=true' )
163
161
@@ -742,9 +740,8 @@ def delete_self_if_testdownstream(args):
742
740
743
741
744
742
def update_import (name , suite_py , rev = "origin/master" ):
745
- mx_name = "mx." + name
746
743
parent = os .path .join (SUITE .dir , ".." )
747
- for dirpath ,dirnames ,filenames in os .walk (parent ):
744
+ for dirpath , dirnames , _ in os .walk (parent ):
748
745
if os .path .sep in os .path .relpath (dirpath , parent ):
749
746
dirnames .clear () # we're looking for siblings or sibling-subdirs
750
747
elif name in dirnames :
@@ -793,7 +790,7 @@ def update_import_cmd(args):
793
790
if os .path .exists (jsonnetfile ):
794
791
local_names .append (sibling )
795
792
repos .append (dd )
796
- for dirpath ,dirnames ,filenames in os .walk (dd ):
793
+ for dirpath , dirnames , filenames in os .walk (dd ):
797
794
mx_dirs = list (filter (lambda x : x .startswith ("mx." ), dirnames ))
798
795
if mx_dirs :
799
796
dirnames [:] = mx_dirs # don't go deeper once we found some mx dirs
@@ -834,9 +831,9 @@ def update_import_cmd(args):
834
831
# find all imports we might update
835
832
imports_to_update = set ()
836
833
for suite_py in suite_py_files :
837
- dict = {}
834
+ d = {}
838
835
with open (suite_py ) as f :
839
- exec (f .read (), dict , dict )
836
+ exec (f .read (), d , d ) # pylint: disable=exec-used;
840
837
for suite in dict ["suite" ].get ("imports" , {}).get ("suites" , []):
841
838
import_name = suite ["name" ]
842
839
if suite .get ("version" ) and import_name not in local_names :
@@ -934,7 +931,7 @@ def _python_checkpatchfiles():
934
931
pypi_base_url = mx_urlrewrites .rewriteurl ("https://pypi.org/packages/" ).replace ("packages/" , "" )
935
932
with open (listfilename , "r" ) as listfile :
936
933
content = listfile .read ()
937
- patchfile_pattern = re .compile ("lib-graalpython/patches/(.*)\.patch" )
934
+ patchfile_pattern = re .compile (r "lib-graalpython/patches/(.*)\.patch" )
938
935
allowed_licenses = ["MIT" , "BSD" , "MIT license" ]
939
936
for line in content .split ("\n " ):
940
937
match = patchfile_pattern .search (line )
@@ -949,7 +946,7 @@ def _python_checkpatchfiles():
949
946
if data_license not in allowed_licenses :
950
947
mx .abort (("The license for the original project %r is %r. We cannot include " +
951
948
"a patch for it. Allowed licenses are: %r." ) % (package_name , data_license , allowed_licenses ))
952
- except Exception as e :
949
+ except Exception as e : # pylint: disable=broad-except;
953
950
mx .abort ("Error getting %r.\n %r" % (package_url , e ))
954
951
finally :
955
952
if response :
@@ -1523,7 +1520,7 @@ def checkout_find_version_for_graalvm(args):
1523
1520
contents = SUITE .vc .git_command (path , ["show" , "%s:%s" % (current_revision , suite )])
1524
1521
d = {}
1525
1522
try :
1526
- exec (contents , d , d )
1523
+ exec (contents , d , d ) # pylint: disable=exec-used;
1527
1524
except :
1528
1525
mx .log ("suite.py no longer parseable, falling back to %s" % current_commit )
1529
1526
return
0 commit comments