Skip to content

Commit 2c17756

Browse files
committed
done
1 parent 267a2cc commit 2c17756

File tree

1 file changed

+4
-4
lines changed
  • packages/aws-library/src/aws_library/ec2

1 file changed

+4
-4
lines changed

packages/aws-library/src/aws_library/ec2/_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ class Resources(BaseModel, frozen=True):
4343
def create_as_empty(cls) -> "Resources":
4444
return cls(cpus=0, ram=ByteSize(0))
4545

46-
# TODO: this is not ok. everything shall be compared!
4746
def __ge__(self, other: "Resources") -> bool:
4847
"""operator for >= comparison
4948
if self has greater or equal resources than other, returns True
50-
This will return True only if any of the resources in self is greater or equal to other
49+
This will return True only if all of the resources in self are greater or equal to other
5150
5251
Note that generic_resources are compared only if they are numeric
5352
Non-numeric generic resources must be equal in both or only defined in self
@@ -59,10 +58,11 @@ def __ge__(self, other: "Resources") -> bool:
5958

6059
def __gt__(self, other: "Resources") -> bool:
6160
"""operator for > comparison
62-
if self has any resources greater than other, returns True (even if different resource types are smaller)
61+
if self has resources greater than other, returns True
62+
This will return True only if all of the resources in self are greater than other
6363
6464
Note that generic_resources are compared only if they are numeric
65-
Non-numeric generic resources must be equal in both or only defined in self
65+
Non-numeric generic resources must only be defined in self
6666
to be considered greater
6767
"""
6868
if (self.cpus > other.cpus) or (self.ram > other.ram):

0 commit comments

Comments
 (0)