Skip to content

Commit b1fe65a

Browse files
committed
.
1 parent c864fd8 commit b1fe65a

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

api/src/opentrons/legacy_commands/publisher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def broker(self, broker: LegacyBroker) -> None:
3131
"""Set the publisher's Broker."""
3232
self._broker = broker
3333

34-
34+
c
3535
CommandPayloadCreator = Callable[..., CommandPayload]
3636
"""A function that creates a Command dictionary message."""
3737

step-generation/src/__tests__/consolidate.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ describe('consolidate single-channel', () => {
140140
name: 'wasteChute',
141141
id: 'wasteChuteId',
142142
location: 'cutoutD3',
143+
pythonName: 'mock_waste_chute',
143144
},
144145
},
145146
}
@@ -618,6 +619,7 @@ describe('consolidate single-channel', () => {
618619
name: 'trashBin',
619620
id: 'trashBinId',
620621
location: 'cutoutA3',
622+
pythonName: 'mock_trash_bin',
621623
},
622624
},
623625
}
@@ -1156,6 +1158,7 @@ describe('consolidate single-channel', () => {
11561158
name: 'trashBin',
11571159
id: 'trashBinId',
11581160
location: 'cutoutA3',
1161+
pythonName: 'mock_trash_bin',
11591162
},
11601163
},
11611164
}

step-generation/src/commandCreators/atomic/moveLabware.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import type {
3030
CommandCreator,
3131
CommandCreatorError,
3232
CommandCreatorWarning,
33+
TrashBinEntity,
3334
} from '../../types'
3435

3536
/** Move labware from one location to another, manually or via a gripper. */
@@ -270,18 +271,17 @@ export const moveLabware: CommandCreator<MoveLabwareParams> = (
270271
const matchingTrashCutoutId = trashCutoutIds.find(
271272
cutoutId => cutoutId === cutoutIdFromAddressableAreaName
272273
)
273-
const matchingTrashId =
274-
matchingTrashCutoutId != null
275-
? Object.values(additionalEquipmentEntities).find(
276-
ae =>
277-
ae.name === 'trashBin' && ae.location === matchingTrashCutoutId
278-
)?.id
279-
: null
274+
const matchingTrashBinEntity: TrashBinEntity | undefined = Object.values(
275+
additionalEquipmentEntities
276+
).find(
277+
ae => ae.name === 'trashBin' && ae.location === matchingTrashCutoutId
278+
)
279+
const matchingTrashId = matchingTrashBinEntity?.id
280280

281281
if (is4thColumnSlot) {
282282
location = formatPyStr(newLocation.addressableAreaName)
283283
} else if (matchingTrashId != null && !isWasteChuteLocation) {
284-
location = additionalEquipmentEntities[matchingTrashId]?.pythonName ?? ''
284+
location = matchingTrashBinEntity?.pythonName ?? ''
285285
} else if (matchingTrashId == null && isWasteChuteLocation) {
286286
location =
287287
Object.values(additionalEquipmentEntities).find(

0 commit comments

Comments
 (0)