Skip to content

Commit 834f74a

Browse files
committed
extend file formatting
1 parent 3f75be4 commit 834f74a

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ slides:
1818
test:
1919
pytest
2020

21-
file := *.py *.ipynb
22-
2321
format:
24-
nbqa black $(file)
22+
black --extend-exclude "/final_project/\w+.ipynb" .
2523

2624
update_packages:
2725
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#updating-an-environment

extras/autograder/source/run_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import unittest
44
from gradescope_utils.autograder_utils.json_test_runner import JSONTestRunner
55

6-
if __name__ == '__main__':
7-
suite = unittest.defaultTestLoader.discover('tests')
8-
with open('/autograder/results/results.json', 'w') as f:
9-
JSONTestRunner(visibility='visible', stream=f).run(suite)
6+
if __name__ == "__main__":
7+
suite = unittest.defaultTestLoader.discover("tests")
8+
with open("/autograder/results/results.json", "w") as f:
9+
JSONTestRunner(visibility="visible", stream=f).run(suite)

extras/autograder/source/tests/test_files.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ def test_notebook_and_py_file(self):
1313
files = os.listdir("/autograder/submission")
1414
extensions = [os.path.splitext(filename)[1] for filename in files]
1515
extensions.sort()
16-
self.assertListEqual(
17-
extensions, [".ipynb", ".py"], f"Files submitted: {', '.join(files)}"
18-
)
16+
self.assertListEqual(extensions, [".ipynb", ".py"], f"Files submitted: {', '.join(files)}")

extras/scripts/attendance.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
FREEBIES = 1
77
TOP_SCORE = NUM_CLASSES - FREEBIES
88

9-
ROLL_CALL_CSV = (
10-
"~/Downloads/attendance_reports_attendance-264e4d14-1765-4396-b311-4d927b59566d.csv"
11-
)
9+
ROLL_CALL_CSV = "~/Downloads/attendance_reports_attendance-264e4d14-1765-4396-b311-4d927b59566d.csv"
1210
# get by clicking into the Assignment and getting from the URL
1311
ASSIGNMENT_ID = 1405957
1412
GRADEBOOK_FILE = "attendance.csv"
@@ -41,9 +39,7 @@ def get_entries(filename: str):
4139

4240
entries = normalize_sections(entries)
4341
# pull the section number out
44-
entries["Section"] = (
45-
entries["Section Name"].str.extract(r"INAFU6504_(\d{3})_").astype(int)
46-
)
42+
entries["Section"] = entries["Section Name"].str.extract(r"INAFU6504_(\d{3})_").astype(int)
4743

4844
return entries
4945

extras/scripts/final_project_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
]
3434
)
3535

36+
3637
# https://sadh.life/post/ast/
3738
class ImportsChecker(ast.NodeVisitor):
3839
def __init__(self):

0 commit comments

Comments
 (0)