From 855be3c386f057228a6831bd026903ac8f558c22 Mon Sep 17 00:00:00 2001 From: Sahan Paliskara Date: Thu, 12 Sep 2024 14:03:46 -0700 Subject: [PATCH] run yarn format thats it --- torchci/components/ErrorBoundary.tsx | 2 +- torchci/components/JobArtifact.tsx | 1 - torchci/components/JobLinks.tsx | 1 - torchci/components/JobTooltip.tsx | 1 - torchci/components/LoggedInMenu.tsx | 1 - torchci/components/LoginSection.tsx | 2 +- torchci/components/PageSelector.tsx | 1 - torchci/components/ReproductionCommand.tsx | 2 +- torchci/components/TestInsights.tsx | 1 - torchci/lib/bot/pytorchBotHandler.ts | 2 +- torchci/pages/[repoOwner]/[repoName]/issues/[issueNumber].tsx | 1 - torchci/pages/[repoOwner]/[repoName]/pull/[prNumber].tsx | 2 +- torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx | 2 +- torchci/pages/benchmark/compilers.tsx | 2 +- torchci/pages/benchmark/torchao.tsx | 2 +- .../failedjobs/[repoOwner]/[repoName]/[branch]/[[...page]].tsx | 2 +- torchci/pages/login_test.tsx | 1 - .../pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx | 2 +- torchci/pages/torchbench/userbenchmark.tsx | 2 +- .../pages/tts/[repoOwner]/[repoName]/[branch]/[[...page]].tsx | 2 +- 20 files changed, 12 insertions(+), 20 deletions(-) diff --git a/torchci/components/ErrorBoundary.tsx b/torchci/components/ErrorBoundary.tsx index d82c5e2b1c..853b3c90bc 100644 --- a/torchci/components/ErrorBoundary.tsx +++ b/torchci/components/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component, ErrorInfo, ReactNode } from "react"; +import { Component, ErrorInfo, ReactNode } from "react"; interface Props { children: ReactNode; diff --git a/torchci/components/JobArtifact.tsx b/torchci/components/JobArtifact.tsx index 63b6ed645d..1f171e289c 100644 --- a/torchci/components/JobArtifact.tsx +++ b/torchci/components/JobArtifact.tsx @@ -1,5 +1,4 @@ import { Artifact } from "lib/types"; -import React from "react"; export default function JobArtifact({ name, diff --git a/torchci/components/JobLinks.tsx b/torchci/components/JobLinks.tsx index d9a48dcbad..5433127b65 100644 --- a/torchci/components/JobLinks.tsx +++ b/torchci/components/JobLinks.tsx @@ -1,6 +1,5 @@ import dayjs from "dayjs"; import { useSession } from "next-auth/react"; -import React from "react"; import useSWR from "swr"; import { isFailure } from "../lib/JobClassifierUtil"; import { isFailedJob, transformJobName } from "../lib/jobUtils"; diff --git a/torchci/components/JobTooltip.tsx b/torchci/components/JobTooltip.tsx index c3a74d9181..54ae9d4fc5 100644 --- a/torchci/components/JobTooltip.tsx +++ b/torchci/components/JobTooltip.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { JobData } from "../lib/types"; import JobLinks from "./JobLinks"; import LogViewer from "./LogViewer"; diff --git a/torchci/components/LoggedInMenu.tsx b/torchci/components/LoggedInMenu.tsx index d3d743b926..6d450e9774 100644 --- a/torchci/components/LoggedInMenu.tsx +++ b/torchci/components/LoggedInMenu.tsx @@ -1,5 +1,4 @@ import { signOut, useSession } from "next-auth/react"; -import React from "react"; import styles from "./LoginSection.module.css"; export default function LoggedInMenu() { diff --git a/torchci/components/LoginSection.tsx b/torchci/components/LoginSection.tsx index 368c3a1eba..eab4e42298 100644 --- a/torchci/components/LoginSection.tsx +++ b/torchci/components/LoginSection.tsx @@ -1,5 +1,5 @@ import { signIn, useSession } from "next-auth/react"; -import React, { useState } from "react"; +import { useState } from "react"; import LoggedInMenu from "./LoggedInMenu"; import styles from "./LoginSection.module.css"; diff --git a/torchci/components/PageSelector.tsx b/torchci/components/PageSelector.tsx index b90304860e..107f0d6fa6 100644 --- a/torchci/components/PageSelector.tsx +++ b/torchci/components/PageSelector.tsx @@ -1,6 +1,5 @@ import { formatHudUrlForRoute, HudParams } from "lib/types"; import Link from "next/link"; -import React from "react"; export default function PageSelector({ params, diff --git a/torchci/components/ReproductionCommand.tsx b/torchci/components/ReproductionCommand.tsx index 1301042fb4..2bd585347e 100644 --- a/torchci/components/ReproductionCommand.tsx +++ b/torchci/components/ReproductionCommand.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { JobData } from "../lib/types"; import CopyLink from "./CopyLink"; import { getTestName } from "./JobLinks"; diff --git a/torchci/components/TestInsights.tsx b/torchci/components/TestInsights.tsx index ffb73751e7..7ae2e15a14 100644 --- a/torchci/components/TestInsights.tsx +++ b/torchci/components/TestInsights.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { JobData } from "../lib/types"; // The following jobs are not supported at the moment because neither the monitoring diff --git a/torchci/lib/bot/pytorchBotHandler.ts b/torchci/lib/bot/pytorchBotHandler.ts index 8b0a38a8d9..2ddf481f7e 100644 --- a/torchci/lib/bot/pytorchBotHandler.ts +++ b/torchci/lib/bot/pytorchBotHandler.ts @@ -6,10 +6,10 @@ import { getHelp, getParser } from "./cliParser"; import { cherryPickClassifications } from "./Constants"; import PytorchBotLogger from "./pytorchbotLogger"; import { + hasWritePermissions as _hasWP, addLabels, CachedConfigTracker, hasApprovedPullRuns, - hasWritePermissions as _hasWP, isFirstTimeContributor, isPyTorchOrg, isPyTorchPyTorch, diff --git a/torchci/pages/[repoOwner]/[repoName]/issues/[issueNumber].tsx b/torchci/pages/[repoOwner]/[repoName]/issues/[issueNumber].tsx index 23ce23f87a..aebd620c27 100644 --- a/torchci/pages/[repoOwner]/[repoName]/issues/[issueNumber].tsx +++ b/torchci/pages/[repoOwner]/[repoName]/issues/[issueNumber].tsx @@ -1,5 +1,4 @@ import { useRouter } from "next/router"; -import React from "react"; export default function Page() { const router = useRouter(); diff --git a/torchci/pages/[repoOwner]/[repoName]/pull/[prNumber].tsx b/torchci/pages/[repoOwner]/[repoName]/pull/[prNumber].tsx index 98edf241c4..a21a31bd83 100644 --- a/torchci/pages/[repoOwner]/[repoName]/pull/[prNumber].tsx +++ b/torchci/pages/[repoOwner]/[repoName]/pull/[prNumber].tsx @@ -3,7 +3,7 @@ import { useSetTitle } from "components/DynamicTitle"; import ErrorBoundary from "components/ErrorBoundary"; import { PRData } from "lib/types"; import { useRouter } from "next/router"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import useSWR from "swr"; const fetcher = (url: string) => fetch(url).then((res) => res.json()); diff --git a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx index ff5aa1217a..ddcf914e16 100644 --- a/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx +++ b/torchci/pages/benchmark/[suite]/[compiler]/[[...page]].tsx @@ -33,7 +33,7 @@ import { fetcher } from "lib/GeneralUtils"; import { RocksetParam } from "lib/rockset"; import { BranchAndCommit, CompilerPerformanceData } from "lib/types"; import { useRouter } from "next/router"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import useSWR from "swr"; import { TimeRangePicker } from "../../../metrics"; diff --git a/torchci/pages/benchmark/compilers.tsx b/torchci/pages/benchmark/compilers.tsx index 07ccdeb23a..683eafe9dd 100644 --- a/torchci/pages/benchmark/compilers.tsx +++ b/torchci/pages/benchmark/compilers.tsx @@ -34,7 +34,7 @@ import { fetcher } from "lib/GeneralUtils"; import { RocksetParam } from "lib/rockset"; import { BranchAndCommit } from "lib/types"; import { useRouter } from "next/router"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import useSWR from "swr"; import { TimeRangePicker } from "../metrics"; diff --git a/torchci/pages/benchmark/torchao.tsx b/torchci/pages/benchmark/torchao.tsx index f8b944ffe1..4a0b5b3a6c 100644 --- a/torchci/pages/benchmark/torchao.tsx +++ b/torchci/pages/benchmark/torchao.tsx @@ -27,7 +27,7 @@ import { fetcher } from "lib/GeneralUtils"; import { RocksetParam } from "lib/rockset"; import { BranchAndCommit } from "lib/types"; import { useRouter } from "next/router"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import useSWR from "swr"; import { TimeRangePicker } from "../metrics"; diff --git a/torchci/pages/failedjobs/[repoOwner]/[repoName]/[branch]/[[...page]].tsx b/torchci/pages/failedjobs/[repoOwner]/[repoName]/[branch]/[[...page]].tsx index b1191acebd..9f6558e637 100644 --- a/torchci/pages/failedjobs/[repoOwner]/[repoName]/[branch]/[[...page]].tsx +++ b/torchci/pages/failedjobs/[repoOwner]/[repoName]/[branch]/[[...page]].tsx @@ -11,7 +11,7 @@ import { JobAnnotation, JobData } from "lib/types"; import _ from "lodash"; import { useRouter } from "next/router"; import { TimeRangePicker } from "pages/metrics"; -import React, { useState } from "react"; +import { useState } from "react"; import useSWR from "swr"; function SimilarFailedJobs({ diff --git a/torchci/pages/login_test.tsx b/torchci/pages/login_test.tsx index ebd15ed3ad..3aba9ddec0 100644 --- a/torchci/pages/login_test.tsx +++ b/torchci/pages/login_test.tsx @@ -1,5 +1,4 @@ import { signIn, signOut, useSession } from "next-auth/react"; -import React from "react"; export default function MePage() { const session = useSession(); diff --git a/torchci/pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx b/torchci/pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx index 2b0c20f582..78f0ef8a90 100644 --- a/torchci/pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx +++ b/torchci/pages/reliability/[repoOwner]/[repoName]/[[...page]].tsx @@ -20,7 +20,7 @@ import { approximateFailureByTypePercent } from "lib/metricUtils"; import { RocksetParam } from "lib/rockset"; import { JobAnnotation } from "lib/types"; import { useRouter } from "next/router"; -import React, { useCallback, useState } from "react"; +import { useCallback, useState } from "react"; import useSWR from "swr"; import { TimeRangePicker } from "../../../metrics"; diff --git a/torchci/pages/torchbench/userbenchmark.tsx b/torchci/pages/torchbench/userbenchmark.tsx index 684c78c83c..ba4ee7ee84 100644 --- a/torchci/pages/torchbench/userbenchmark.tsx +++ b/torchci/pages/torchbench/userbenchmark.tsx @@ -15,7 +15,7 @@ import { TablePanelWithData } from "components/metrics/panels/TablePanel"; import dayjs from "dayjs"; import { fetcher } from "lib/GeneralUtils"; import { RocksetParam } from "lib/rockset"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import useSWR from "swr"; const queryCollection = "torchbench"; diff --git a/torchci/pages/tts/[repoOwner]/[repoName]/[branch]/[[...page]].tsx b/torchci/pages/tts/[repoOwner]/[repoName]/[branch]/[[...page]].tsx index 5aa3d24b38..bc03c3604d 100644 --- a/torchci/pages/tts/[repoOwner]/[repoName]/[branch]/[[...page]].tsx +++ b/torchci/pages/tts/[repoOwner]/[repoName]/[branch]/[[...page]].tsx @@ -13,7 +13,7 @@ import ReactECharts from "echarts-for-react"; import { fetcher } from "lib/GeneralUtils"; import { RocksetParam } from "lib/rockset"; import { useRouter } from "next/router"; -import React, { useCallback, useState } from "react"; +import { useCallback, useState } from "react"; import useSWR from "swr"; import { TimeRangePicker, TtsPercentilePicker } from "../../../../metrics";