Apply autopep8 formatting to entire codebase

This commit is contained in:
Torantulino
2023-04-02 09:13:15 +01:00
parent a2e5de7469
commit b4685f67e6
11 changed files with 224 additions and 69 deletions

View File

@@ -1,6 +1,7 @@
import docker
import os
def execute_python_file(file):
workspace_folder = "auto_gpt_workspace"
@@ -16,11 +17,15 @@ def execute_python_file(file):
client = docker.from_env()
# You can replace 'python:3.8' with the desired Python image/version
# You can find available Python images on Docker Hub: https://hub.docker.com/_/python
# You can find available Python images on Docker Hub:
# https://hub.docker.com/_/python
container = client.containers.run(
'python:3.8',
f'python {file}',
volumes={os.path.abspath(workspace_folder): {'bind': '/workspace', 'mode': 'ro'}},
volumes={
os.path.abspath(workspace_folder): {
'bind': '/workspace',
'mode': 'ro'}},
working_dir='/workspace',
stderr=True,
stdout=True,
@@ -34,4 +39,4 @@ def execute_python_file(file):
return logs
except Exception as e:
return f"Error: {str(e)}"
return f"Error: {str(e)}"