Skip to content

Commit

Permalink
Rollback __hash__ for Device
Browse files Browse the repository at this point in the history
  • Loading branch information
jsouter committed Oct 22, 2024
1 parent 2b20371 commit 0b026e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ophyd_async/core/_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ async def connect(
# Wait for it to complete
await self._connect_task

def __hash__(self):
# to allow Devices to be used as dict keys
return hash(id(self))


DeviceT = TypeVar("DeviceT", bound=Device)

Expand Down Expand Up @@ -187,7 +183,7 @@ def children(self) -> Iterator[tuple[str, Device]]:
for key, child in self._children.items():
yield str(key), child

def __hash__(self): # to allow DeviceVector to be used as dict keys
def __hash__(self): # to allow DeviceVector to be used as dict keys and in sets
return hash(id(self))


Expand Down

0 comments on commit 0b026e5

Please sign in to comment.