Skip to content

Commit

Permalink
remove __contains__
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Nov 19, 2024
1 parent 3707ec4 commit 538ea63
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions api/src/opentrons/protocol_api/labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ def api_version(self) -> APIVersion:
def __getitem__(self, key: str) -> Well:
return self.wells_by_name()[key]

def __contains__(self, key: str) -> bool:
return key in self.wells_by_name()

@property
@requires_version(2, 0)
def uri(self) -> str:
Expand Down Expand Up @@ -1153,7 +1150,7 @@ def load_liquid(
well_names: List[str] = []
for well in wells:
if isinstance(well, str):
if well not in self:
if well not in self.wells_by_name():
raise KeyError(
f"{well} is not a well in labware {self.name}. The elements of wells should name wells in this labware."
)
Expand Down Expand Up @@ -1202,7 +1199,7 @@ def load_liquid_by_well(
verified_volumes: Dict[str, float] = {}
for well, volume in volumes.items():
if isinstance(well, str):
if well not in self:
if well not in self.wells_by_name():
raise KeyError(
f"{well} is not a well in {self.name}. The keys of volumes should name wells in this labware"
)
Expand Down Expand Up @@ -1241,7 +1238,7 @@ def load_empty(self, wells: Sequence[Union[Well, str]]) -> None:
well_names: List[str] = []
for well in wells:
if isinstance(well, str):
if well not in self:
if well not in self.wells_by_name():
raise KeyError(
f"{well} is not a well in {self.name}. The elements of wells should name wells in this labware."
)
Expand Down

0 comments on commit 538ea63

Please sign in to comment.