aboutsummaryrefslogtreecommitdiff
path: root/compile_api.py
diff options
context:
space:
mode:
authorromangraef <romangraef@loves.dicksinhisan.us>2018-07-10 10:17:36 +0200
committerromangraef <romangraef@loves.dicksinhisan.us>2018-07-10 10:17:36 +0200
commit3a0eb77cd7f0771d92c5b4a4dc58b02eaa16c239 (patch)
treef6c6d836742e50a66fa47939c62e7948a58efabf /compile_api.py
parent2f759c65d89b796ee7136b0d3e2cb5757a5fcf95 (diff)
downloadevalbot-3a0eb77cd7f0771d92c5b4a4dc58b02eaa16c239.tar.gz
evalbot-3a0eb77cd7f0771d92c5b4a4dc58b02eaa16c239.tar.bz2
evalbot-3a0eb77cd7f0771d92c5b4a4dc58b02eaa16c239.zip
removed python3.7 features
Diffstat (limited to 'compile_api.py')
-rw-r--r--compile_api.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/compile_api.py b/compile_api.py
index 5da9f02..82ac440 100644
--- a/compile_api.py
+++ b/compile_api.py
@@ -1,5 +1,4 @@
import asyncio
-from dataclasses import dataclass
import aiohttp
@@ -20,13 +19,18 @@ def post(url, data=None, json=None, **kwargs):
return asyncio.get_event_loop().run_in_executor(None, lambda *_: requests.post(url, data, json, **kwargs))
-@dataclass
class ExecuteResponse(object):
output: str
cpu_time: float
memory: int
status_code: int
+ def __init__(self, output: str, cpu_time: float, memory: int, status_code: int):
+ self.output: str = output
+ self.cpu_time: float = cpu_time
+ self.memory: int = memory
+ self.status_code: int = status_code
+
def parse_execute_response(response: dict) -> ExecuteResponse:
memory = response['memory']