Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-paul committed Sep 26, 2024
1 parent 54de0e8 commit 3840078
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"video_path": ["http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/"],
"video_path": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/"
],
"video_file": ["BigBuckBunny.mp4"]
}
6 changes: 2 additions & 4 deletions mephisto/review_app/client/src/pages/TaskPage/TaskPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
* LICENSE file in the root directory of this source tree.
*/

import InitialParametersCollapsable
from "components/InitialParametersCollapsable/InitialParametersCollapsable";
import InitialParametersCollapsable from "components/InitialParametersCollapsable/InitialParametersCollapsable";
import { InReviewFileModal } from "components/InReviewFileModal/InReviewFileModal";
import ResultsCollapsable from "components/ResultsCollapsable/ResultsCollapsable";
import VideoAnnotatorWebVTTCollapsable
from "components/VideoAnnotatorWebVTTCollapsable/VideoAnnotatorWebVTTCollapsable";
import VideoAnnotatorWebVTTCollapsable from "components/VideoAnnotatorWebVTTCollapsable/VideoAnnotatorWebVTTCollapsable";
import WorkerOpinionCollapsable from "components/WorkerOpinionCollapsable/WorkerOpinionCollapsable";
import {
MESSAGES_IFRAME_DATA_KEY,
Expand Down
13 changes: 7 additions & 6 deletions mephisto/review_app/client/src/pages/UnitPage/UnitPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@
* LICENSE file in the root directory of this source tree.
*/

import InitialParametersCollapsable
from "components/InitialParametersCollapsable/InitialParametersCollapsable";
import InitialParametersCollapsable from "components/InitialParametersCollapsable/InitialParametersCollapsable";
import { InReviewFileModal } from "components/InReviewFileModal/InReviewFileModal";
import ResultsCollapsable from "components/ResultsCollapsable/ResultsCollapsable";
import TasksHeader from "components/TasksHeader/TasksHeader";
import VideoAnnotatorWebVTTCollapsable
from "components/VideoAnnotatorWebVTTCollapsable/VideoAnnotatorWebVTTCollapsable";
import VideoAnnotatorWebVTTCollapsable from "components/VideoAnnotatorWebVTTCollapsable/VideoAnnotatorWebVTTCollapsable";
import WorkerOpinionCollapsable from "components/WorkerOpinionCollapsable/WorkerOpinionCollapsable";
import { MESSAGES_IFRAME_DATA_KEY, MESSAGES_IN_REVIEW_FILE_DATA_KEY } from "consts/review";
import {
MESSAGES_IFRAME_DATA_KEY,
MESSAGES_IN_REVIEW_FILE_DATA_KEY,
} from "consts/review";
import { setPageTitle } from "helpers";
import * as React from "react";
import { useEffect } from "react";
import { Spinner } from "react-bootstrap";
import { useParams } from "react-router-dom";
import { getTask } from 'requests/tasks';
import { getTask } from "requests/tasks";
import { getUnits, getUnitsDetails } from "requests/units";
import urls from "urls";
import "./UnitPage.css";
Expand Down
2 changes: 1 addition & 1 deletion mephisto/review_app/server/utils/video_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def convert_annotation_tracks_to_webvtt(
return None

webvtt = WebVTT(
header_comments=[f"Mephisto Task \"{task_name}\""],
header_comments=[f'Mephisto Task "{task_name}"'],
footer_comments=["Copyright (c) Meta Platforms and its affiliates."],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,9 @@ function AnnotationTrack({
duration={duration}
isSelectedAnnotationTrack={isSelectedAnnotationTrack}
key={`track-segment-${segmentIndex}`}
onClickSegment={(e, index) => segmentIsValid && onClickSegment(e, index)}
onClickSegment={(e, index) =>
segmentIsValid && onClickSegment(e, index)
}
paddingLeft={paddingLeft}
playerSizes={playerSizes}
segment={segment}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ function VideoAnnotator({

{annotatorInstruction && (
<div className={`instruction-hint`}>
For instructions, click "Task Instructions" button in the top-right
corner.
For instructions, click "Task Instructions" button in the
top-right corner.
</div>
)}

Expand Down
19 changes: 8 additions & 11 deletions packages/mephisto-task-addons/src/helpers/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ export function pluralizeString(str, num, str_plural) {
if (num !== 1) {
if (!!str_plural) {
return str_plural;
}
else{
let pluralizedEnding = '';
if (str.endsWith('s') || str.endsWith('ch')) {
pluralizedEnding = 'es';
}
else if (str.endsWith('z')) {
pluralizedEnding = 'zes';
}
else {
pluralizedEnding = 's';
} else {
let pluralizedEnding = "";
if (str.endsWith("s") || str.endsWith("ch")) {
pluralizedEnding = "es";
} else if (str.endsWith("z")) {
pluralizedEnding = "zes";
} else {
pluralizedEnding = "s";
}
return `${str}${pluralizedEnding}`;
}
Expand Down

0 comments on commit 3840078

Please sign in to comment.