Skip to content

Commit

Permalink
uuids method
Browse files Browse the repository at this point in the history
  • Loading branch information
t-ober committed May 2, 2024
1 parent 0f20953 commit 7016016
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pypsdm/models/result/participant/dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@


class EntitiesResultDictMixin:
def uuids(self) -> set[str]:
return {key.uuid for key in self.keys()} # type: ignore

@classmethod
@abstractmethod
Expand Down Expand Up @@ -142,7 +144,6 @@ def from_csv_for_entity(


class EmsResult(ComplexPowerDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPower]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand All @@ -167,7 +168,6 @@ def entity_type(cls) -> EntitiesEnum:


class LoadsResult(ComplexPowerDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPower]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand All @@ -192,7 +192,6 @@ def entity_type(cls) -> EntitiesEnum:


class FixedFeedInsResult(ComplexPowerDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPower]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand All @@ -217,7 +216,6 @@ def entity_type(cls) -> EntitiesEnum:


class PvsResult(ComplexPowerDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPower]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand All @@ -242,7 +240,6 @@ def entity_type(cls) -> EntitiesEnum:


class WecsResult(ComplexPowerDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPower]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand All @@ -267,7 +264,6 @@ def entity_type(cls) -> EntitiesEnum:


class StoragesResult(ComplexPowerWithSocDict[EntityKey], EntitiesResultDictMixin):

def __init__(self, data: dict[EntityKey, ComplexPowerWithSoc]):
for key, value in data.items():
if not isinstance(key, EntityKey):
Expand Down

0 comments on commit 7016016

Please sign in to comment.