mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 13:15:00 +00:00
style: Reorder imports and format code
This commit is contained in:
parent
5de0a0f7a9
commit
cb42464676
1 changed files with 6 additions and 3 deletions
|
@ -1,12 +1,12 @@
|
|||
import ctypes
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
from io import BytesIO
|
||||
import psutil
|
||||
import ctypes
|
||||
|
||||
import pexpect
|
||||
import psutil
|
||||
|
||||
|
||||
def run_cmd(command, verbose=False, error_print=None):
|
||||
|
@ -30,7 +30,9 @@ def get_parent_process_name():
|
|||
kernel32 = ctypes.windll.kernel32
|
||||
h_process = kernel32.OpenProcess(0x0400, False, os.getppid())
|
||||
exe_path = ctypes.create_unicode_buffer(260)
|
||||
kernel32.QueryFullProcessImageNameW(h_process, 0, exe_path, ctypes.byref(ctypes.c_ulong(260)))
|
||||
kernel32.QueryFullProcessImageNameW(
|
||||
h_process, 0, exe_path, ctypes.byref(ctypes.c_ulong(260))
|
||||
)
|
||||
kernel32.CloseHandle(h_process)
|
||||
return os.path.basename(exe_path.value).lower()
|
||||
else:
|
||||
|
@ -38,6 +40,7 @@ def get_parent_process_name():
|
|||
except:
|
||||
return None
|
||||
|
||||
|
||||
def run_cmd_subprocess(command, verbose=False):
|
||||
if verbose:
|
||||
print("Using run_cmd_subprocess:", command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue