1313CHECKOUT_GYP_PATH = os .path .join (CHECKOUT_PATH , "gyp" )
1414
1515parser = argparse .ArgumentParser ()
16- parser .add_argument ("--no-commit" ,
17- action = "store_true" ,
18- dest = "no_commit" ,
19- help = "do not run git-commit" )
16+ parser .add_argument (
17+ "--no-commit" , action = "store_true" , dest = "no_commit" , help = "do not run git-commit"
18+ )
2019parser .add_argument ("tag" , help = "gyp tag to update to" )
2120args = parser .parse_args ()
2221
3736
3837 print ("Unzipping..." )
3938 with tarfile .open (tar_file , "r:gz" ) as tar_ref :
40- def is_within_directory (directory , target ):
4139
40+ def is_within_directory (directory , target ):
4241 abs_directory = os .path .abspath (directory )
4342 abs_target = os .path .abspath (target )
4443
@@ -47,7 +46,6 @@ def is_within_directory(directory, target):
4746 return prefix == abs_directory
4847
4948 def safe_extract (tar , path = "." , members = None , * , numeric_owner = False ):
50-
5149 for member in tar .getmembers ():
5250 member_path = os .path .join (path , member .name )
5351 if not is_within_directory (path , member_path ):
@@ -65,7 +63,7 @@ def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
6563 )
6664
6765if not args .no_commit :
68- subprocess .check_output (["git" , "add" , "gyp" ], cwd = CHECKOUT_PATH )
69- subprocess .check_output ([
70- "git" , "commit" , "-m" , f"feat(gyp): update gyp to { args .tag } "
71- ] )
66+ subprocess .check_output (["git" , "add" , "gyp" ], cwd = CHECKOUT_PATH )
67+ subprocess .check_output (
68+ [ "git" , "commit" , "-m" , f"feat(gyp): update gyp to { args .tag } " ]
69+ )
0 commit comments