@@ -601,6 +601,7 @@ def executeBuiltinUmask(cmd, shenv):
601601 raise InternalShellError (cmd , "Error: 'umask': %s" % str (err ))
602602 return ShellCommandResult (cmd , "" , "" , 0 , False )
603603
604+
604605def executeBuiltinUlimit (cmd , shenv ):
605606 """executeBuiltinUlimit - Change the current limits."""
606607 if os .name != "posix" :
@@ -616,7 +617,9 @@ def executeBuiltinUlimit(cmd, shenv):
616617 elif cmd .args [1 ] == "-n" :
617618 shenv .ulimit ["RLIMIT_NOFILE" ] = new_limit
618619 else :
619- raise InternalShellError (cmd , "'ulimit' does not support option: %s" % cmd .args [1 ])
620+ raise InternalShellError (
621+ cmd , "'ulimit' does not support option: %s" % cmd .args [1 ]
622+ )
620623 return ShellCommandResult (cmd , "" , "" , 0 , False )
621624
622625
@@ -945,7 +948,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
945948 # with some core utility distributions.
946949 if kIsWindows :
947950 args = quote_windows_command (args )
948-
951+
949952 # Handle any resource limits. We do this by launching the command with
950953 # a wrapper that sets the necessary limits. We use a wrapper rather than
951954 # setting the limits in process as we cannot reraise the limits back to
@@ -954,7 +957,9 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
954957 args .insert (0 , sys .executable )
955958 args .insert (1 , os .path .join (builtin_commands_dir , "_launch_with_limit.py" ))
956959 for limit in cmd_shenv .ulimit :
957- cmd_shenv .env ["LIT_INTERNAL_ULIMIT_" + limit ] = str (cmd_shenv .ulimit [limit ])
960+ cmd_shenv .env ["LIT_INTERNAL_ULIMIT_" + limit ] = str (
961+ cmd_shenv .ulimit [limit ]
962+ )
958963
959964 try :
960965 # TODO(boomanaiden154): We currently wrap the subprocess.Popen with
0 commit comments