Skip to content

Commit

Permalink
🔧 MAINTAIN: Remove Entity.init_from_backend (#5441)
Browse files Browse the repository at this point in the history
This method is superfluous
  • Loading branch information
chrisjsewell authored Mar 14, 2022
1 parent 47ebc6c commit 7c51328
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions aiida/orm/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def from_backend_entity(cls: Type[EntityType], backend_entity: BackendEntityType

type_check(backend_entity, BackendEntity)
entity = cls.__new__(cls)
entity.init_from_backend(backend_entity)
entity._backend_entity = backend_entity
call_with_super_check(entity.initialize)
return entity

Expand All @@ -200,12 +200,6 @@ def __init__(self, backend_entity: BackendEntityType) -> None:
self._backend_entity = backend_entity
call_with_super_check(self.initialize)

def init_from_backend(self, backend_entity: BackendEntityType) -> None:
"""
:param backend_entity: the backend model supporting this entity
"""
self._backend_entity = backend_entity

@super_check
def initialize(self) -> None:
"""Initialize instance attributes.
Expand Down

0 comments on commit 7c51328

Please sign in to comment.