fixed rookie mistakes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-12-03 22:31:33 +01:00
parent 35a68fe549
commit a9f473e2d9
8 changed files with 100 additions and 28 deletions

View File

@@ -7,9 +7,10 @@ class BucketResourceType(Enum):
class BucketResource:
type: BucketResourceType = BucketResourceType.NetworkLink
currentUsage: int = 0
capacity: int = 0
def __init__(self):
self.type: BucketResourceType = BucketResourceType.NetworkLink
self.currentUsage: int = 0
self.capacity: int = 0
def reserve(self, resource: int) -> bool:
if self.capacity == self.currentUsage or resource > self.capacity - self.currentUsage: