Skip to content

Commit

Permalink
lint, format
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Sep 24, 2024
1 parent 23d5d8d commit ea39c9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
6 changes: 1 addition & 5 deletions app/src/organisms/Devices/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import type {
FetchPipettesResponsePipette,
Mount,
} from '/app/redux/pipettes/types'
import type {
Instruments,
PipetteData,
PipetteOffsetCalibration,
} from '@opentrons/api-client'
import type { PipetteOffsetCalibration } from '@opentrons/api-client'

/**
* formats a string if it is in ISO 8601 date format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ import { INCONSISTENT_PIPETTE_OFFSET } from '@opentrons/api-client'
import type { Instruments, PipetteData } from '@opentrons/api-client'

export function getShowPipetteCalibrationWarning(
attachedInstruments?: Instruments
attachedInstruments?: Instruments
): boolean {
return (
attachedInstruments?.data.some((i): i is PipetteData => {
const failuresList =
i.ok &&
i.data.calibratedOffset?.reasonability_check_failures != null
? i.data.calibratedOffset?.reasonability_check_failures
: []
if (failuresList.length > 0) {
return failuresList[0]?.kind === INCONSISTENT_PIPETTE_OFFSET
} else return false
}) ?? false
)
return (
attachedInstruments?.data.some((i): i is PipetteData => {
const failuresList =
i.ok && i.data.calibratedOffset?.reasonability_check_failures != null
? i.data.calibratedOffset?.reasonability_check_failures
: []
if (failuresList.length > 0) {
return failuresList[0]?.kind === INCONSISTENT_PIPETTE_OFFSET
} else return false
}) ?? false
)
}

0 comments on commit ea39c9b

Please sign in to comment.