import subprocess import sys try: result = subprocess.run([sys.executable, "-m", "ruff", "check", ".", "--fix"], capture_output=True, text=True) print("STDOUT:", result.stdout) if result.stderr: print("STDERR:", result.stderr) print("Return code:", result.returncode) except Exception as e: print(f"Error running ruff: {e}")