Skip to content

Commit 5549b07

Browse files
committed
run new prettier on the course codebase (it hasn't been touched for while, so this avoids spurious changes)
1 parent 159fea2 commit 5549b07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+217
-203
lines changed

src/packages/frontend/course/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export class CourseActions extends Actions<CourseState> {
246246

247247
// ACTIVITY ACTIONS
248248
public set_activity(
249-
opts: { id: number; desc?: string } | { id?: number; desc: string }
249+
opts: { id: number; desc?: string } | { id?: number; desc: string },
250250
): number {
251251
return this.activity.set_activity(opts);
252252
}
@@ -349,7 +349,7 @@ export class CourseActions extends Actions<CourseState> {
349349
| "peer_config"
350350
| "handout"
351351
| "skip_grading",
352-
item_id
352+
item_id,
353353
): void {
354354
let adjusted;
355355
const store = this.get_store();

src/packages/frontend/course/activity/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class ActivityActions {
2121
}
2222

2323
public set_activity(
24-
opts: { id: number; desc?: string } | { id?: number; desc: string }
24+
opts: { id: number; desc?: string } | { id?: number; desc: string },
2525
): number {
2626
if (this.actions.is_closed()) return -1;
2727
if (opts.id == null) {

src/packages/frontend/course/assignments/assignment-student-list.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const StudentListForAssignment: React.FC<StudentListForAssignmentProps> =
8383
terms.length > 0 &&
8484
!search_match(
8585
store.get_student_name(x.student_id).toLowerCase(),
86-
terms
86+
terms,
8787
)
8888
) {
8989
continue;
@@ -124,7 +124,7 @@ export const StudentListForAssignment: React.FC<StudentListForAssignmentProps> =
124124
if (student == null) return; // no such student
125125
const key = util.assignment_identifier(
126126
assignment.get("assignment_id"),
127-
student_id
127+
student_id,
128128
);
129129
const edited_feedback = active_feedback_edits.get(key);
130130
return (
@@ -137,18 +137,18 @@ export const StudentListForAssignment: React.FC<StudentListForAssignmentProps> =
137137
grade={store.get_grade(assignment.get("assignment_id"), student_id)}
138138
nbgrader_scores={store.get_nbgrader_scores(
139139
assignment.get("assignment_id"),
140-
student_id
140+
student_id,
141141
)}
142142
nbgrader_score_ids={store.get_nbgrader_score_ids(
143-
assignment.get("assignment_id")
143+
assignment.get("assignment_id"),
144144
)}
145145
comments={store.get_comments(
146146
assignment.get("assignment_id"),
147-
student_id
147+
student_id,
148148
)}
149149
info={store.student_assignment_info(
150150
student_id,
151-
assignment.get("assignment_id")
151+
assignment.get("assignment_id"),
152152
)}
153153
is_editing={!!edited_feedback}
154154
nbgrader_run_info={nbgrader_run_info}
@@ -163,7 +163,7 @@ export const StudentListForAssignment: React.FC<StudentListForAssignmentProps> =
163163
rowRenderer={({ key }) => render_student_info(key)}
164164
rowKey={(index) => student_list[index]}
165165
cacheId={`course-assignment-${assignment.get(
166-
"assignment_id"
166+
"assignment_id",
167167
)}-${name}-${frame_id}`}
168168
/>
169169
);

src/packages/frontend/course/assignments/assignment.tsx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
183183
function date_change(date): void {
184184
actions.assignments.set_due_date(
185185
assignment.get("assignment_id"),
186-
date != null ? date.toISOString() : undefined
186+
date != null ? date.toISOString() : undefined,
187187
);
188188
}
189189

@@ -214,7 +214,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
214214
on_save={(value) =>
215215
actions.assignments.set_assignment_note(
216216
assignment.get("assignment_id"),
217-
value
217+
value,
218218
)
219219
}
220220
/>
@@ -266,7 +266,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
266266
<Button
267267
onClick={() =>
268268
actions.assignments.export_collected(
269-
assignment.get("assignment_id")
269+
assignment.get("assignment_id"),
270270
)
271271
}
272272
>
@@ -324,7 +324,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
324324
</Col>
325325
</Row>
326326
</Col>
327-
</Row>
327+
</Row>,
328328
);
329329

330330
if (expand_peer_config) {
@@ -333,7 +333,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
333333
<Col md={20} offset={4}>
334334
{render_configure_peer()}
335335
</Col>
336-
</Row>
336+
</Row>,
337337
);
338338
}
339339
if (confirm_delete) {
@@ -342,7 +342,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
342342
<Col md={20} offset={4}>
343343
{render_confirm_delete()}
344344
</Col>
345-
</Row>
345+
</Row>,
346346
);
347347
}
348348

@@ -361,7 +361,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
361361
<Col md={width} key={key}>
362362
{render_nbgrader_button(status)}
363363
{b2}
364-
</Col>
364+
</Col>,
365365
);
366366
};
367367

@@ -375,7 +375,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
375375
buttons.push(
376376
<Col md={width} key={name}>
377377
{b}
378-
</Col>
378+
</Col>,
379379
);
380380
if (peer && name === "peer_collect") {
381381
insert_grade_button("skip_peer_collect");
@@ -397,15 +397,15 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
397397
<Col md={20} key="buttons">
398398
<Row>{buttons}</Row>
399399
</Col>
400-
</Row>
400+
</Row>,
401401
);
402402

403403
v.push(
404404
<Row key="header2-copy">
405405
<Col md={20} offset={4}>
406406
{render_copy_confirms(status)}
407407
</Col>
408-
</Row>
408+
</Row>,
409409
);
410410
}
411411
/* The whiteSpace:'normal' here is because we put this in an
@@ -463,7 +463,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
463463
// a lot more work to properly implement.
464464
actions.toggle_item_expansion(
465465
"assignment",
466-
assignment.get("assignment_id")
466+
assignment.get("assignment_id"),
467467
);
468468
}
469469
return redux
@@ -601,7 +601,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
601601
type="text"
602602
onChange={(e) =>
603603
set_copy_assignment_confirm_overwrite_text(
604-
(e.target as any).value
604+
(e.target as any).value,
605605
)
606606
}
607607
style={{ marginTop: "1ex" }}
@@ -624,7 +624,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
624624
function copy_assignment(
625625
step,
626626
new_only: boolean,
627-
overwrite: boolean = false
627+
overwrite: boolean = false,
628628
) {
629629
// assign assignment to all (non-deleted) students
630630
const assignment_id: string | undefined = assignment.get("assignment_id");
@@ -634,31 +634,31 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
634634
actions.assignments.copy_assignment_to_all_students(
635635
assignment_id,
636636
new_only,
637-
overwrite
637+
overwrite,
638638
);
639639
break;
640640
case "collect":
641641
actions.assignments.copy_assignment_from_all_students(
642642
assignment_id,
643-
new_only
643+
new_only,
644644
);
645645
break;
646646
case "peer_assignment":
647647
actions.assignments.peer_copy_to_all_students(
648648
assignment_id,
649-
new_only
649+
new_only,
650650
);
651651
break;
652652
case "peer_collect":
653653
actions.assignments.peer_collect_from_all_students(
654654
assignment_id,
655-
new_only
655+
new_only,
656656
);
657657
break;
658658
case "return_graded":
659659
actions.assignments.return_assignment_to_all_students(
660660
assignment_id,
661-
new_only
661+
new_only,
662662
);
663663
break;
664664
default:
@@ -707,7 +707,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
707707

708708
function render_copy_confirm_to_all(
709709
step: AssignmentCopyStep,
710-
status
710+
status,
711711
): Rendered {
712712
const n = status[`not_${step}`];
713713
const message = (
@@ -743,7 +743,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
743743
}
744744

745745
function copy_confirm_all_caution(
746-
step: AssignmentCopyStep
746+
step: AssignmentCopyStep,
747747
): Rendered | string {
748748
switch (step) {
749749
case "assignment":
@@ -777,7 +777,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
777777
}
778778

779779
function render_copy_confirm_overwrite_all(
780-
step: AssignmentCopyStep
780+
step: AssignmentCopyStep,
781781
): Rendered {
782782
return (
783783
<div key={"copy_confirm_overwrite_all"} style={{ marginTop: "15px" }}>
@@ -812,7 +812,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
812812

813813
function render_copy_confirm_to_all_or_new(
814814
step: AssignmentCopyStep,
815-
status
815+
status,
816816
): Rendered {
817817
const n = status[`not_${step}`];
818818
const m = n + status[step];
@@ -1077,7 +1077,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
10771077
actions.assignments.set_skip(
10781078
assignment.get("assignment_id"),
10791079
"grading",
1080-
!assignment.get("skip_grading")
1080+
!assignment.get("skip_grading"),
10811081
);
10821082
}
10831083

@@ -1182,7 +1182,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
11821182

11831183
function undelete_assignment() {
11841184
return actions.assignments.undelete_assignment(
1185-
assignment.get("assignment_id")
1185+
assignment.get("assignment_id"),
11861186
);
11871187
}
11881188

@@ -1264,7 +1264,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
12641264
onClick={() =>
12651265
actions.toggle_item_expansion(
12661266
"peer_config",
1267-
assignment.get("assignment_id")
1267+
assignment.get("assignment_id"),
12681268
)
12691269
}
12701270
>
@@ -1303,7 +1303,7 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
13031303
e.preventDefault();
13041304
actions.toggle_item_expansion(
13051305
"assignment",
1306-
assignment.get("assignment_id")
1306+
assignment.get("assignment_id"),
13071307
);
13081308
}}
13091309
>
@@ -1338,5 +1338,5 @@ export const Assignment: React.FC<AssignmentProps> = React.memo(
13381338
</div>
13391339
);
13401340
},
1341-
isSame
1341+
isSame,
13421342
);

src/packages/frontend/course/assignments/assignments-panel.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,27 @@ export const AssignmentsPanel: React.FC<Props> = React.memo((props: Props) => {
5151

5252
const expanded_assignments: Set<string> = useRedux(
5353
name,
54-
"expanded_assignments"
54+
"expanded_assignments",
5555
);
5656
const active_assignment_sort: SortDescription = useRedux(
5757
name,
58-
"active_assignment_sort"
58+
"active_assignment_sort",
5959
);
6060
const active_student_sort: SortDescription = useRedux(
6161
name,
62-
"active_student_sort"
62+
"active_student_sort",
6363
);
6464
const expanded_peer_configs: Set<string> = useRedux(
6565
name,
66-
"expanded_peer_configs"
66+
"expanded_peer_configs",
6767
);
6868
const active_feedback_edits: IsGradingMap = useRedux(
6969
name,
70-
"active_feedback_edits"
70+
"active_feedback_edits",
7171
);
7272
const nbgrader_run_info: NBgraderRunInfo | undefined = useRedux(
7373
name,
74-
"nbgrader_run_info"
74+
"nbgrader_run_info",
7575
);
7676

7777
// search query to restrict which assignments are shown.
@@ -132,15 +132,15 @@ export const AssignmentsPanel: React.FC<Props> = React.memo((props: Props) => {
132132

133133
function render_sort_link(
134134
column_name: string,
135-
display_name: string
135+
display_name: string,
136136
): Rendered {
137137
return (
138138
<a
139139
href=""
140140
onClick={(e) => {
141141
e.preventDefault();
142142
return course_actions.assignments.set_active_assignment_sort(
143-
column_name
143+
column_name,
144144
);
145145
}}
146146
>
@@ -193,7 +193,7 @@ export const AssignmentsPanel: React.FC<Props> = React.memo((props: Props) => {
193193
}
194194

195195
function render_assignments(
196-
assignments: { assignment_id: string }[]
196+
assignments: { assignment_id: string }[],
197197
): Rendered {
198198
if (assignments.length == 0) {
199199
return render_no_assignments();
@@ -249,7 +249,7 @@ export const AssignmentsPanel: React.FC<Props> = React.memo((props: Props) => {
249249

250250
function render_show_deleted(
251251
num_deleted: number,
252-
num_shown: number
252+
num_shown: number,
253253
): Rendered {
254254
if (show_deleted) {
255255
return (

0 commit comments

Comments
 (0)