Skip to content

Commit 861bb37

Browse files
committed
Break out calculation over multiple lines
1 parent cd4cdd4 commit 861bb37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

citc/aws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ def get_types_info(client):
8282
for page in client.get_paginator("describe_instance_types").paginate()
8383
for i in page["InstanceTypes"]
8484
}
85+
aws_mem = d["MemoryInfo"]["SizeInMiB"]
8586
return {
8687
s: {
87-
"memory": d["MemoryInfo"]["SizeInMiB"] - int(math.pow(d["MemoryInfo"]["SizeInMiB"], 0.7) * 0.9 + 500),
88+
"memory": aws_mem - int(math.pow(aws_mem, 0.7) * 0.9 + 500),
8889
"cores_per_socket": d["VCpuInfo"]["DefaultCores"],
8990
"threads_per_core": d["VCpuInfo"]["DefaultThreadsPerCore"],
9091
"arch": d["ProcessorInfo"]["SupportedArchitectures"][0],

0 commit comments

Comments
 (0)