From 289d52c682e0f71d5765857f77b3e44688c5ccdb Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 14 May 2024 12:52:06 +0530 Subject: [PATCH] lint-fix --- .../components/Search/SearchBar/searchInput/MenuWithPeople.tsx | 2 +- .../src/components/Search/SearchBar/searchInput/index.tsx | 2 +- web/apps/photos/src/components/ml/PeopleList.tsx | 2 +- web/apps/photos/src/constants/mlConfig.ts | 2 +- web/apps/photos/src/services/ml/types.ts | 2 +- web/apps/photos/src/utils/machineLearning/faceAlign.ts | 2 +- web/apps/photos/src/utils/machineLearning/faceCrop.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/apps/photos/src/components/Search/SearchBar/searchInput/MenuWithPeople.tsx b/web/apps/photos/src/components/Search/SearchBar/searchInput/MenuWithPeople.tsx index 9b5d59eac..1ea50873c 100644 --- a/web/apps/photos/src/components/Search/SearchBar/searchInput/MenuWithPeople.tsx +++ b/web/apps/photos/src/components/Search/SearchBar/searchInput/MenuWithPeople.tsx @@ -5,8 +5,8 @@ import { t } from "i18next"; import { AppContext } from "pages/_app"; import { useContext } from "react"; import { components } from "react-select"; -import { IndexStatus } from "utils/storage/mlIDbStorage"; import { Suggestion, SuggestionType } from "types/search"; +import { IndexStatus } from "utils/storage/mlIDbStorage"; const { Menu } = components; diff --git a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx index 3b995b849..da462a3b5 100644 --- a/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx +++ b/web/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx @@ -10,6 +10,7 @@ import { components } from "react-select"; import AsyncSelect from "react-select/async"; import { InputActionMeta } from "react-select/src/types"; import { City } from "services/locationSearchService"; +import { Person } from "services/ml/types"; import { getAutoCompleteSuggestions, getDefaultOptions, @@ -17,7 +18,6 @@ import { import { Collection } from "types/collection"; import { LocationTagData } from "types/entity"; import { EnteFile } from "types/file"; -import { Person } from "services/ml/types"; import { ClipSearchScores, DateValue, diff --git a/web/apps/photos/src/components/ml/PeopleList.tsx b/web/apps/photos/src/components/ml/PeopleList.tsx index ea317fbec..65a41b355 100644 --- a/web/apps/photos/src/components/ml/PeopleList.tsx +++ b/web/apps/photos/src/components/ml/PeopleList.tsx @@ -3,8 +3,8 @@ import { Skeleton, styled } from "@mui/material"; import { Legend } from "components/PhotoViewer/styledComponents/Legend"; import { t } from "i18next"; import React, { useEffect, useState } from "react"; -import { EnteFile } from "types/file"; import { Face, Person } from "services/ml/types"; +import { EnteFile } from "types/file"; import { getPeopleList, getUnidentifiedFaces } from "utils/machineLearning"; const FaceChipContainer = styled("div")` diff --git a/web/apps/photos/src/constants/mlConfig.ts b/web/apps/photos/src/constants/mlConfig.ts index d8aaeb410..0ee200942 100644 --- a/web/apps/photos/src/constants/mlConfig.ts +++ b/web/apps/photos/src/constants/mlConfig.ts @@ -1,5 +1,5 @@ -import { JobConfig } from "types/common/job"; import { MLSearchConfig, MLSyncConfig } from "services/ml/types"; +import { JobConfig } from "types/common/job"; export const DEFAULT_ML_SYNC_JOB_CONFIG: JobConfig = { intervalSec: 5, diff --git a/web/apps/photos/src/services/ml/types.ts b/web/apps/photos/src/services/ml/types.ts index 97eb9c070..2ee42b36a 100644 --- a/web/apps/photos/src/services/ml/types.ts +++ b/web/apps/photos/src/services/ml/types.ts @@ -1,7 +1,7 @@ import { DebugInfo } from "hdbscan"; import PQueue from "p-queue"; -import { EnteFile } from "types/file"; import { Dimensions } from "services/ml/geom"; +import { EnteFile } from "types/file"; import { Box, Point } from "./geom"; export interface MLSyncResult { diff --git a/web/apps/photos/src/utils/machineLearning/faceAlign.ts b/web/apps/photos/src/utils/machineLearning/faceAlign.ts index 435f43d2b..3e6846ff8 100644 --- a/web/apps/photos/src/utils/machineLearning/faceAlign.ts +++ b/web/apps/photos/src/utils/machineLearning/faceAlign.ts @@ -1,7 +1,7 @@ import { Matrix } from "ml-matrix"; +import { Point } from "services/ml/geom"; import { FaceAlignment, FaceDetection } from "services/ml/types"; import { getSimilarityTransformation } from "similarity-transformation"; -import { Point } from "services/ml/geom"; const ARCFACE_LANDMARKS = [ [38.2946, 51.6963], diff --git a/web/apps/photos/src/utils/machineLearning/faceCrop.ts b/web/apps/photos/src/utils/machineLearning/faceCrop.ts index 211c08d65..6a9a1efcd 100644 --- a/web/apps/photos/src/utils/machineLearning/faceCrop.ts +++ b/web/apps/photos/src/utils/machineLearning/faceCrop.ts @@ -1,7 +1,7 @@ +import { Box } from "services/ml/geom"; import { FaceAlignment, FaceCrop, FaceCropConfig } from "services/ml/types"; import { cropWithRotation } from "utils/image"; import { enlargeBox } from "."; -import { Box } from "services/ml/geom"; export function getFaceCrop( imageBitmap: ImageBitmap,