Skip to content

Commit

Permalink
fix up formatting and delinquent imports
Browse files Browse the repository at this point in the history
  • Loading branch information
b-cooper committed May 13, 2024
1 parent d5bbac2 commit 7e9cb76
Show file tree
Hide file tree
Showing 159 changed files with 918 additions and 715 deletions.
6 changes: 5 additions & 1 deletion api-client/src/modules/api-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import type { ModuleType, Coordinates, ModuleModel } from '@opentrons/shared-data'
import type {
ModuleType,
Coordinates,
ModuleModel,
} from '@opentrons/shared-data'

type PortGroup = 'main' | 'left' | 'right' | 'front' | 'unknown'
interface PhysicalPort {
Expand Down
14 changes: 12 additions & 2 deletions api-client/src/request.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import Axios from 'axios'

import type { AxiosRequestConfig, Method, AxiosPromise, AxiosResponse } from 'axios'
import type {
AxiosRequestConfig,
Method,
AxiosPromise,
AxiosResponse,
} from 'axios'
import type { HostConfig } from './types'

export type ResponsePromise<Data> = AxiosPromise<Data>
Expand All @@ -26,7 +31,12 @@ export function request<ResData, ReqData = null>(
config: HostConfig,
params?: AxiosRequestConfig['params']
): ResponsePromise<ResData> {
const { hostname, port, requestor = (...args) => Axios.request(...args), token } = config
const {
hostname,
port,
requestor = (...args) => Axios.request(...args),
token,
} = config

const tokenHeader = token != null ? { authenticationBearer: token } : {}
const headers = { ...DEFAULT_HEADERS, ...tokenHeader }
Expand Down
1 change: 0 additions & 1 deletion app-shell-odd/src/notifications/subscribe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { connectionStore } from './store'
import {
sendDeserialized,
Expand Down
1 change: 0 additions & 1 deletion app-shell/src/notifications/subscribe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { connectionStore } from './store'
import {
sendDeserialized,
Expand Down
5 changes: 3 additions & 2 deletions app-shell/src/robot-update/release-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { move, readdir, remove, readFile } from 'fs-extra'
import StreamZip from 'node-stream-zip'
import getStream from 'get-stream'


import { createLogger } from '../log'
import { fetchToFile } from '../http'
import { CURRENT_VERSION } from '../update'
Expand Down Expand Up @@ -151,7 +150,9 @@ export function readUpdateFileInfo(systemFile: string): Promise<UserFileInfo> {
versionInfo,
}))

result.finally(() => { zip.close() })
result.finally(() => {
zip.close()
})

return result
})
Expand Down
12 changes: 7 additions & 5 deletions app/src/atoms/MenuList/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,23 @@ export const MenuItem = styled.button<ButtonProps>`
text-align: ${TYPOGRAPHY.textAlignCenter};
font-size: ${TYPOGRAPHY.fontSize28};
background-color: ${({ isAlert }) =>
isAlert != null ? COLORS.red50 : COLORS.transparent};
color: ${({ isAlert }) => (isAlert != null ? COLORS.white : COLORS.black90)};
isAlert != null ? COLORS.red50 : COLORS.transparent};
color: ${({ isAlert }) =>
isAlert != null ? COLORS.white : COLORS.black90};
padding: ${SPACING.spacing24};
height: 5.5rem;
line-height: ${TYPOGRAPHY.lineHeight36};
&:hover,
&:active {
background-color: ${({ isAlert }) =>
isAlert != null ? COLORS.red50 : COLORS.grey35};
isAlert != null ? COLORS.red50 : COLORS.grey35};
}
&:disabled {
background-color: ${({ isAlert }) =>
isAlert != null ? COLORS.red50 : COLORS.transparent};
color: ${({ isAlert }) => (isAlert != null ? COLORS.white : COLORS.grey50)};
isAlert != null ? COLORS.red50 : COLORS.transparent};
color: ${({ isAlert }) =>
isAlert != null ? COLORS.white : COLORS.grey50};
}
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { describe, it, expect } from 'vitest'
import '@testing-library/jest-dom/vitest'
import { transfer_settings } from '@opentrons/shared-data'
import { createSnippet } from '../createSnippet'
import type { ModuleModel, CompletedProtocolAnalysis } from '@opentrons/shared-data'
import type {
ModuleModel,
CompletedProtocolAnalysis,
} from '@opentrons/shared-data'

const protocolWithMagTempTC = ({
...transfer_settings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
getAnalyticsOptedIn,
} from '../../redux/analytics'

import type { MapStateToProps, MapDispatchToProps } from 'react-redux'
import type { MapStateToProps, MapDispatchToProps } from 'react-redux'
import type { State } from '../../redux/types'

interface SP {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import isEqual from 'lodash/isEqual'
import { getLabwareDisplayName, IDENTITY_VECTOR, getLoadedLabwareDefinitionsByUri } from '@opentrons/shared-data'
import {
getLabwareDisplayName,
IDENTITY_VECTOR,
getLoadedLabwareDefinitionsByUri,
} from '@opentrons/shared-data'
import { useAllHistoricOffsets } from './useAllHistoricOffsets'
import { getLabwareLocationCombos } from './getLabwareLocationCombos'

import type { ProtocolAnalysisOutput, CompletedProtocolAnalysis } from '@opentrons/shared-data'
import type {
ProtocolAnalysisOutput,
CompletedProtocolAnalysis,
} from '@opentrons/shared-data'
import type { LabwareOffset } from '@opentrons/api-client'
export interface OffsetCandidate extends LabwareOffset {
runCreatedAt: string
Expand Down
6 changes: 5 additions & 1 deletion app/src/organisms/ChangePipette/ConfirmPipette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import { CheckPipettesButton } from './CheckPipettesButton'
import { SimpleWizardBody } from '../../molecules/SimpleWizardBody'
import { LevelPipette } from './LevelPipette'

import type { PipetteNameSpecs, PipetteModelSpecs, PipetteDisplayCategory, } from '@opentrons/shared-data'
import type {
PipetteNameSpecs,
PipetteModelSpecs,
PipetteDisplayCategory,
} from '@opentrons/shared-data'
import type { PipetteOffsetCalibration } from '../../redux/calibration/types'
import type { Mount } from '../../redux/pipettes/types'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { vi, it, describe, expect, beforeEach } from 'vitest'
import { fireEvent } from '@testing-library/react'

import { LEFT} from '@opentrons/shared-data'
import { LEFT } from '@opentrons/shared-data'
import {
nestedTextMatcher,
renderWithProviders,
Expand Down
6 changes: 5 additions & 1 deletion app/src/organisms/CommandText/LoadCommandText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import {
getLiquidDisplayName,
} from './utils'

import type { RunTimeCommand, RobotType, LoadLabwareRunTimeCommand } from '@opentrons/shared-data'
import type {
RunTimeCommand,
RobotType,
LoadLabwareRunTimeCommand,
} from '@opentrons/shared-data'
import type { CommandTextData } from './types'

interface LoadCommandTextProps {
Expand Down
8 changes: 6 additions & 2 deletions app/src/organisms/CommandText/__tests__/CommandText.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import * as React from 'react'
import { it, expect, describe } from 'vitest'

import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE, GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA } from '@opentrons/shared-data'
import {
FLEX_ROBOT_TYPE,
OT2_ROBOT_TYPE,
GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA,
} from '@opentrons/shared-data'
import { renderWithProviders } from '../../../__testing-utils__'
import { i18n } from '../../../i18n'
import { CommandText } from '../'
Expand All @@ -25,7 +29,7 @@ import type {
MoveToWellRunTimeCommand,
PrepareToAspirateRunTimeCommand,
RunTimeCommand,
MoveToAddressableAreaForDropTipRunTimeCommand
MoveToAddressableAreaForDropTipRunTimeCommand,
} from '@opentrons/shared-data'

describe('CommandText', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from 'react'
import { when } from 'vitest-when'
import { describe, it, beforeEach, vi, afterEach, expect } from 'vitest'
import { getLabwareDisplayName, fixtureTiprack300ul } from '@opentrons/shared-data'
import {
getLabwareDisplayName,
fixtureTiprack300ul,
} from '@opentrons/shared-data'
import {
nestedTextMatcher,
renderWithProviders,
Expand All @@ -12,7 +15,11 @@ import { getLabwareLocation } from '../utils/getLabwareLocation'
import { LabwareInfoOverlay } from '../LabwareInfoOverlay'
import { getLabwareDefinitionUri } from '../utils/getLabwareDefinitionUri'
import { useLabwareOffsetForLabware } from '../useLabwareOffsetForLabware'
import type { LabwareDefinition2, ProtocolFile, LoadedLabware } from '@opentrons/shared-data'
import type {
LabwareDefinition2,
ProtocolFile,
LoadedLabware,
} from '@opentrons/shared-data'

vi.mock('../../../ProtocolUpload/hooks')
vi.mock('../utils/getLabwareLocation')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { when } from 'vitest-when'
import { describe, it, beforeEach, vi, expect, afterEach } from 'vitest'

import { getLabwareDefURI, multiple_tipacks_with_tc, opentrons96PcrAdapterV1 } from '@opentrons/shared-data'
import {
getLabwareDefURI,
multiple_tipacks_with_tc,
opentrons96PcrAdapterV1,
} from '@opentrons/shared-data'
import { getLabwareOffsetLocation } from '../getLabwareOffsetLocation'
import { getLabwareLocation } from '../getLabwareLocation'
import { getModuleInitialLoadInfo } from '../getModuleInitialLoadInfo'
import type {
LoadedLabware,
LoadedModule,
LabwareDefinition2,
CompletedProtocolAnalysis
CompletedProtocolAnalysis,
} from '@opentrons/shared-data'

vi.mock('../getLabwareLocation')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { describe, it, expect } from 'vitest'
import { transfer_settings } from '@opentrons/shared-data'
import { getModuleInitialLoadInfo } from '../getModuleInitialLoadInfo'
import type { LoadModuleRunTimeCommand, CompletedProtocolAnalysis } from '@opentrons/shared-data'
import type {
LoadModuleRunTimeCommand,
CompletedProtocolAnalysis,
} from '@opentrons/shared-data'

const protocolWithMagTempTC = (transfer_settings as unknown) as CompletedProtocolAnalysis

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import { describe, it, expect } from 'vitest'
import { transfer_settings, multiple_temp_modules, ot2DeckDefV5, getModuleDef2 } from '@opentrons/shared-data'
import {
transfer_settings,
multiple_temp_modules,
ot2DeckDefV5,
getModuleDef2,
} from '@opentrons/shared-data'
import { getProtocolModulesInfo } from '../getProtocolModulesInfo'
import type { ProtocolAnalysisOutput, LoadedLabware, LoadedModule } from '@opentrons/shared-data'
import type {
ProtocolAnalysisOutput,
LoadedLabware,
LoadedModule,
} from '@opentrons/shared-data'

const protocolWithMagTempTC = ({
...transfer_settings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {
getLabwareDisplayName,
import { getLabwareDisplayName } from '@opentrons/shared-data'
import type {
LoadLabwareRunTimeCommand,
RunTimeCommand,
LoadModuleRunTimeCommand,
ModuleModel,
} from '@opentrons/shared-data'
import type { LoadLabwareRunTimeCommand, RunTimeCommand, LoadModuleRunTimeCommand, ModuleModel } from '@opentrons/shared-data'

export interface LocationInfoNames {
slotName: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import {
useAllSessionsQuery,
useCurrentAllSubsystemUpdatesQuery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { vi, it, expect, describe, beforeEach } from 'vitest'
import { when } from 'vitest-when'
import { renderHook } from '@testing-library/react'
import { OT2_ROBOT_TYPE } from '@opentrons/shared-data'
import { useProtocolAnalysisAsDocumentQuery, useProtocolQuery } from '@opentrons/react-api-client'
import {
useProtocolAnalysisAsDocumentQuery,
useProtocolQuery,
} from '@opentrons/react-api-client'
import { useProtocolDetailsForRun } from '..'
import { useNotifyRunQuery } from '../../../../resources/runs'
import { RUN_ID_2 } from '../../../RunTimeControl/__fixtures__'
Expand Down
6 changes: 5 additions & 1 deletion app/src/organisms/Devices/hooks/useCalibrationTaskList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import { DECK_CAL_STATUS_OK } from '../../../redux/calibration/constants'
import { formatTimestamp } from '../utils'

import type { PipetteName } from '@opentrons/shared-data'
import type { SubTaskProps, TaskListProps, TaskProps } from '../../TaskList/types'
import type {
SubTaskProps,
TaskListProps,
TaskProps,
} from '../../TaskList/types'
import type { AttachedPipette } from '../../../redux/pipettes/types'
import type { DashboardCalOffsetInvoker } from '../../../pages/Devices/CalibrationDashboard/hooks/useDashboardCalibratePipOffset'
import type { DashboardCalTipLengthInvoker } from '../../../pages/Devices/CalibrationDashboard/hooks/useDashboardCalibrateTipLength'
Expand Down
12 changes: 10 additions & 2 deletions app/src/organisms/Devices/hooks/useRunCalibrationStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ import {
import { useMostRecentCompletedAnalysis } from '../../LabwarePositionCheck/useMostRecentCompletedAnalysis'
import { isGripperInCommands } from '../../../resources/protocols/utils'
import { useInstrumentsQuery } from '@opentrons/react-api-client'
import type { GripperData, Instruments, PipetteData } from '@opentrons/api-client'
import type { CompletedProtocolAnalysis, LoadedPipette, ProtocolAnalysisOutput } from '@opentrons/shared-data'
import type {
GripperData,
Instruments,
PipetteData,
} from '@opentrons/api-client'
import type {
CompletedProtocolAnalysis,
LoadedPipette,
ProtocolAnalysisOutput,
} from '@opentrons/shared-data'
import type { DeckCalibrationStatus } from '../../../redux/calibration/api-types'

export interface ProtocolCalibrationStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {
} from '@opentrons/react-api-client'
import { i18n } from '../../../i18n'
import { FirmwareUpdateModal } from '..'
import type { BadPipette, PipetteData, SubsystemUpdateProgressData } from '@opentrons/api-client'
import type {
BadPipette,
PipetteData,
SubsystemUpdateProgressData,
} from '@opentrons/api-client'

vi.mock('@opentrons/react-api-client')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import {
BORDERS,
JUSTIFY_FLEX_START,
} from '@opentrons/components'
import { NINETY_SIX_CHANNEL, SINGLE_MOUNT_PIPETTES } from '@opentrons/shared-data'
import {
NINETY_SIX_CHANNEL,
SINGLE_MOUNT_PIPETTES,
} from '@opentrons/shared-data'

import { SmallButton } from '../../atoms/buttons'
import {
Expand All @@ -25,7 +28,11 @@ import { PipetteWizardFlows } from '../PipetteWizardFlows'
import { GripperWizardFlows } from '../GripperWizardFlows'

import type { InstrumentData } from '@opentrons/api-client'
import type { GripperModel, PipetteName, LoadedPipette } from '@opentrons/shared-data'
import type {
GripperModel,
PipetteName,
LoadedPipette,
} from '@opentrons/shared-data'
import type { Mount } from '../../redux/pipettes/types'

export const MountItem = styled.div<{ isReady: boolean }>`
Expand Down
6 changes: 5 additions & 1 deletion app/src/organisms/InterventionModal/__fixtures__/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { SPAN7_8_10_11_SLOT, THERMOCYCLER_MODULE_V1, getModuleDef2 } from '@opentrons/shared-data'
import {
SPAN7_8_10_11_SLOT,
THERMOCYCLER_MODULE_V1,
getModuleDef2,
} from '@opentrons/shared-data'

import type { RunData } from '@opentrons/api-client'
import type {
Expand Down
5 changes: 4 additions & 1 deletion app/src/organisms/LabwarePositionCheck/AttachProbe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import attachProbe8 from '../../assets/videos/pipette-wizard-flows/Pipette_Attac
import attachProbe96 from '../../assets/videos/pipette-wizard-flows/Pipette_Attach_Probe_96.webm'
import { GenericWizardTile } from '../../molecules/GenericWizardTile'

import type { CompletedProtocolAnalysis, CreateCommand } from '@opentrons/shared-data'
import type {
CompletedProtocolAnalysis,
CreateCommand,
} from '@opentrons/shared-data'
import type { LabwareOffset } from '@opentrons/api-client'
import type { Jog } from '../../molecules/JogControls/types'
import type { useChainRunCommands } from '../../resources/runs'
Expand Down
Loading

0 comments on commit 7e9cb76

Please sign in to comment.